From 5737783f92d2cb6b8a10100097544bb4aa627a01 Mon Sep 17 00:00:00 2001 From: Enrico Loparco Date: Wed, 30 Nov 2022 10:51:28 +0100 Subject: [PATCH] Update document for MacOS compilation (#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: https://github.com/bytecodealliance/wasm-micro-runtime/issues/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 --- doc/source_debugging.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source_debugging.md b/doc/source_debugging.md index a07cebc4..c18c6126 100644 --- a/doc/source_debugging.md +++ b/doc/source_debugging.md @@ -28,6 +28,7 @@ mkdir build && cd build cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 make ``` +> Note: On MacOS M1 environment, pass the additional `-DWAMR_DISABLE_HW_BOUND_CHECK=1` cmake configuration. 3. Execute iwasm with debug engine enabled ``` bash @@ -43,6 +44,7 @@ mkdir build-lldb && cd build-lldb cmake -DCMAKE_BUILD_TYPE:STRING="Release" -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly" -DLLVM_ENABLE_LIBXML2:BOOL=ON ../llvm make -j $(nproc) ``` +> Note: If using `CommandLineTools` on MacOS, make sure only one SDK is present in `/Library/Developer/CommandLineTools/SDKs`. 5. Launch customized lldb and connect to iwasm ``` bash