Skip to content

Commit 4c54d27

Browse files
Enrico LoparcoNingW101
authored andcommitted
Update document for MacOS compilation (bytecodealliance#1770)
When building LLVM, if multiple SDKs are installed in `/Library/Developer/CommandLineTools/SDKs`, headers from multiple SDKs are picked, generating build errors as describe here: bytecodealliance#1758. Without disabling the bound checks (i.e. -DWAMR_DISABLE_HW_BOUND_CHECK=1) when building `iwasm`, the `-g=127.0.0.1:1234` parameter makes the runtime crash. Update the document to avoid the issues. Signed-off-by: eloparco <[email protected]>
1 parent d6a153b commit 4c54d27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/source_debugging.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ mkdir build && cd build
2828
cmake .. -DWAMR_BUILD_DEBUG_INTERP=1
2929
make
3030
```
31+
> Note: On MacOS M1 environment, pass the additional `-DWAMR_DISABLE_HW_BOUND_CHECK=1` cmake configuration.
3132
3233
3. Execute iwasm with debug engine enabled
3334
``` bash
@@ -43,6 +44,7 @@ mkdir build-lldb && cd build-lldb
4344
cmake -DCMAKE_BUILD_TYPE:STRING="Release" -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly" -DLLVM_ENABLE_LIBXML2:BOOL=ON ../llvm
4445
make -j $(nproc)
4546
```
47+
> Note: If using `CommandLineTools` on MacOS, make sure only one SDK is present in `/Library/Developer/CommandLineTools/SDKs`.
4648
4749
5. Launch customized lldb and connect to iwasm
4850
``` bash

0 commit comments

Comments
 (0)