Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemorySanitizerLibcxxHowTo document is out-of-date #1815

Open
aDotInTheVoid opened this issue Nov 13, 2024 · 1 comment
Open

MemorySanitizerLibcxxHowTo document is out-of-date #1815

aDotInTheVoid opened this issue Nov 13, 2024 · 1 comment

Comments

@aDotInTheVoid
Copy link

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;libunwind" \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DLLVM_USE_SANITIZER=MemoryWithOrigins

Could this be updated on the wiki?

@aDotInTheVoid
Copy link
Author

Caused by llvm/llvm-project@258477e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant