2014-06-16 21:17:21 +04:00
|
|
|
MOZ_AUTOMATION_L10N_CHECK=0
|
|
|
|
|
2013-01-22 23:16:20 +04:00
|
|
|
. "$topsrcdir/build/mozconfig.common"
|
|
|
|
|
2012-06-26 20:26:57 +04:00
|
|
|
# Use Clang as specified in manifest
|
|
|
|
export CC="$topsrcdir/clang/bin/clang -fgnu89-inline"
|
|
|
|
export CXX="$topsrcdir/clang/bin/clang++"
|
2013-09-20 15:37:53 +04:00
|
|
|
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
2012-05-16 02:24:14 +04:00
|
|
|
|
|
|
|
# Mandatory flags for ASan
|
2014-10-22 17:52:03 +04:00
|
|
|
export ASANFLAGS="-fsanitize=address -Dxmalloc=myxmalloc -fPIC"
|
2012-05-16 02:24:14 +04:00
|
|
|
export CFLAGS="$ASANFLAGS"
|
|
|
|
export CXXFLAGS="$ASANFLAGS"
|
2014-10-22 17:52:03 +04:00
|
|
|
export LDFLAGS="-fsanitize=address"
|
2012-05-16 02:24:14 +04:00
|
|
|
|
|
|
|
# Enable ASan specific code and build workarounds
|
|
|
|
ac_add_options --enable-address-sanitizer
|
|
|
|
|
|
|
|
# Mandatory options required for ASan builds (both on Linux and Mac)
|
|
|
|
export MOZ_DEBUG_SYMBOLS=1
|
|
|
|
ac_add_options --enable-debug-symbols
|
|
|
|
ac_add_options --disable-install-strip
|
|
|
|
ac_add_options --disable-jemalloc
|
|
|
|
ac_add_options --disable-crashreporter
|
|
|
|
ac_add_options --disable-elf-hack
|
2013-07-26 21:43:12 +04:00
|
|
|
|
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"
|