Open
Description
On https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo#instrumented-libc, the instructions say to run:
cmake -GNinja ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_USE_SANITIZER=MemoryWithOrigins
However this fails with:
CMake Error at CMakeLists.txt:130 (MESSAGE):
libcxx isn't a known project:
bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl;flang.
Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?
Based on reading the libc++ vendor docs, the correct build command should be:
cmake -GNinja -S ../runtimes \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLIBCXXABI_USE_LLVM_UNWINDER=off \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_USE_SANITIZER=MemoryWithOrigins
Could this be updated on the wiki?