Bug 753135 - Add AddressSanitizer mozconfig files to the tree, r=catlee

This commit is contained in:
Christian Holler 2012-05-15 15:24:14 -07:00
parent c162315386
commit 0f25e1bb27
5 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Use at least -O1 for optimization to avoid stack space
# exhaustions caused by Clang function inlining.
ac_add_options --enable-debug
ac_add_options --enable-optimize="-O1"
# ASan specific options on Linux
ac_add_options --enable-valgrind
. $topsrcdir/build/unix/mozconfig.asan
# Avoid dependency on libstdc++ 4.5
ac_add_options --enable-stdcxx-compat
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

View File

@ -0,0 +1,20 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -g"
# ASan specific options on Linux
ac_add_options --enable-valgrind
# Other options
ac_add_options --enable-codesighs
. $topsrcdir/build/unix/mozconfig.asan
# Avoid dependency on libstdc++ 4.5
ac_add_options --enable-stdcxx-compat
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

View File

@ -0,0 +1,18 @@
# Use at least -O1 for optimization to avoid stack space
# exhaustions caused by Clang function inlining.
ac_add_options --enable-debug
ac_add_options --enable-optimize="-O1"
# ASan specific options on Linux
ac_add_options --enable-valgrind
. $topsrcdir/build/unix/mozconfig.asan
# Avoid dependency on libstdc++ 4.5
ac_add_options --enable-stdcxx-compat
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

View File

@ -0,0 +1,20 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -g"
# ASan specific options on Linux
ac_add_options --enable-valgrind
# Other options
ac_add_options --enable-codesighs
. $topsrcdir/build/unix/mozconfig.asan
# Avoid dependency on libstdc++ 4.5
ac_add_options --enable-stdcxx-compat
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

20
build/unix/mozconfig.asan Normal file
View File

@ -0,0 +1,20 @@
# Use Clang r155417
export CC="/tools/clang-3.0/bin/clang -fgnu89-inline"
export CXX="/tools/clang-3.0/bin/clang++"
# Mandatory flags for ASan
export ASANFLAGS="-faddress-sanitizer -Dxmalloc=myxmalloc -fPIC"
export CFLAGS="$ASANFLAGS"
export CXXFLAGS="$ASANFLAGS"
export LDFLAGS="-faddress-sanitizer"
# 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