2015-07-15 04:45:54 +03:00
|
|
|
MOZ_AUTOMATION_L10N_CHECK=0
|
|
|
|
|
|
|
|
. "$topsrcdir/build/mozconfig.common"
|
|
|
|
|
|
|
|
# Use Clang as specified in manifest
|
|
|
|
export CC="$topsrcdir/clang/bin/clang"
|
|
|
|
export CXX="$topsrcdir/clang/bin/clang++"
|
|
|
|
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
|
|
|
|
2016-06-15 21:49:45 +03:00
|
|
|
# Use a newer binutils, from the tooltool gcc package, if it's there
|
|
|
|
if [ -e "$topsrcdir/gcc/bin/ld" ]; then
|
|
|
|
export CC="$CC -B $topsrcdir/gcc/bin"
|
|
|
|
export CXX="$CXX -B $topsrcdir/gcc/bin"
|
|
|
|
fi
|
|
|
|
|
2015-07-15 04:45:54 +03:00
|
|
|
# Enable TSan specific code and build workarounds
|
|
|
|
ac_add_options --enable-thread-sanitizer
|
|
|
|
|
2016-07-13 03:30:23 +03:00
|
|
|
# The ThreadSanitizer is not compatible with sandboxing
|
2015-07-15 04:45:54 +03:00
|
|
|
# (see bug 1182565)
|
|
|
|
ac_add_options --disable-sandbox
|
|
|
|
|
|
|
|
# These are required by TSan
|
|
|
|
ac_add_options --disable-jemalloc
|
|
|
|
ac_add_options --disable-crashreporter
|
|
|
|
ac_add_options --disable-elf-hack
|
|
|
|
ac_add_options --enable-pie
|
|
|
|
|
|
|
|
# Keep symbols to symbolize TSan traces
|
|
|
|
ac_add_options --disable-install-strip
|
|
|
|
# -gline-tables-only results in significantly smaller binaries.
|
|
|
|
ac_add_options --enable-debug-symbols="-gline-tables-only"
|
|
|
|
|
Bug 1278456 - Add the tooltool GCC library directory to LD_LIBRARY_PATH on Linux builds. r=mshal
Build slaves on automation are based on Centos 6, which doesn't have a
recent enough version of libstdc++ for our new requirements. But since
we're building with a recent GCC or clang with its own libstdc++, we do
have such a libstdc++ available somewhere, and the compiler picks it
when invoking the linker.
Problems start happening when we execute some of the built programs
during the build, like host tools (e.g. nsinstall), or target programs
(xpcshell, during packaging). In that case, we need the compiler's
libstdc++ to be used. Which required adding the GCC or clang library
directory to LD_LIBRARY_PATH.
Unconveniently enough, the clang 3.5 tooltool package we're using for
ASAN builds until we can update to at least 3.8 (bug 1278718) doesn't
contain libstdc++.so. So for those builds, pull the GCC package from
tooltool as well, and pick libstdc++ from there.
2016-06-07 07:50:36 +03:00
|
|
|
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|