Skip to content

Instantly share code, notes, and snippets.

@alepez
Last active November 22, 2022 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alepez/ed917c2c884fb5352753e2077be799cd to your computer and use it in GitHub Desktop.
Save alepez/ed917c2c884fb5352753e2077be799cd to your computer and use it in GitHub Desktop.
Build clang libcxx libcxxabi instrumented with msan
wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-14.0.6.tar.gz
tar zxf llvmorg-14.0.6.tar.gz
cd llvm-project-llvmorg-14.0.6
rm -rf build
mkdir -p build
cd build
cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLLVM_EXTERNAL_LIT=/usr/bin/lit \
-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=NO \
-DLLVM_USE_SANITIZER=MemoryWithOrigins \
../runtimes
ninja cxx cxxabi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment