3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00

Second pass at getting MSAN working with azure pipelines

This commit is contained in:
Everett Maus 2019-08-08 18:36:33 -07:00
parent 9cccfb97ac
commit ed29e1ffa5
2 changed files with 19 additions and 3 deletions

View file

@ -3,7 +3,8 @@ variables:
cmakeStdArgs: '-DBUILD_DOTNET_BINDINGS=True -DBUILD_JAVA_BINDINGS=True -DBUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
asanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer" CFLAGS="${CFLAGS} -fsanitize=address -fno-omit-frame-pointer"'
ubsanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=undefined" CFLAGS="${CFLAGS} -fsanitize=undefined"'
msanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -O2" CFLAGS="${CFLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -O2"'
msanEnv: 'CC=clang LDFLAGS="-L../libcxx/libcxx_msan/lib -lc++abi -Wl,-rpath=../libcxx/libcxx_msan/lib" CXX=clang++ CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -fsanitize-memory-track-origins -fsanitize=memory -fPIE -fno-omit-frame-pointer -g -O2" CFLAGS="${CFLAGS} -stdlib=libc -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -g -O2"'
jobs:
@ -57,8 +58,8 @@ jobs:
cmdLine: 'CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DSINGLE_THREADED=ON $(cmakeStdArgs)'
runUnitTest: 'True'
msanClang:
cmdLine: 'CC=clang CXX=clang++ $(msanEnv) cmake $(cmakeStdArgs)'
runUnitTest: 'True'
cmdLine: '$(asanEnv) cmake $(cmakeStdArgs) && ../scripts/build_libcxx_msan.sh'
runUnitTest: 'False' # asanEnv doesn't seem to get picked up by unit tests
# gccX86:
# cmdLine: 'CXXFLAGS="${CXXFLAGS} -m32" CFLAGS="${CFLAGS} -m32" CC=gcc-5 CXX=g++-5 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo $(cmakeStdArgs)'
# runUnitTest: 'True'

View file

@ -0,0 +1,15 @@
#!/bin/sh
cd ..
mkdir libcxx
cd libcxx
# Checkout LLVM, libc++ and libc++abi
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
(cd llvm/projects && svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx)
(cd llvm/projects && svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi)
# Build libc++ with MSan:
mkdir libcxx_msan && cd libcxx_msan
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
make cxx -j4
cd ../build