I use the following two SCons invocations to generate ninja files.
python ./buildscripts/scons.py --modules= --dbg=off --opt=on --link-model=dynamic --variables-files=./etc/scons/mongodbtoolchain_stable_gcc.vars --ninja generate-ninja ICECC=icecc CCACHE=ccache python ./buildscripts/scons.py --modules= --dbg=on --opt=on --link-model=dynamic --variables-files=./etc/scons/mongodbtoolchain_stable_clang.vars --ninja generate-ninja ICECC=icecc CCACHE=ccache --sanitize=address --allocator=system NINJA_PREFIX=asan VARIANT_DIR=asandebug
I find that I must delete the contents of the build/install/ directory when switching from an ASan build to a non-ASan build.
$ rm -rf build/install/* $ ninja -f build.ninja -j 200 build/install/bin/wt [21/21 (100%) 0.033s] Install build/install/bin/wt $ ninja -f asan.ninja -j 200 build/install/bin/wt [14/14 (100%) 0.081s] Install build/install/bin/wt $ ninja -f build.ninja -j 200 build/install/bin/wt [10/10 (100%) 0.055s] Install build/install/bin/wt $ ./build/install/bin/wt ./build/install/bin/wt: symbol lookup error: /home/ubuntu/mongo/build/install/bin/../lib/libshim_allocator.so: undefined symbol: __asan_init
(Using the wt tool as an example here because it compiles quickly.)
- is related to
-
SERVER-66384 Enable command line customization of NINJA_BUILDDIR
- Closed