Bug 1484872 - Remove --enable-llvm-hacks. r=froydnj

It calls for cargo-culting its use when using clang, when it's specific
to skipping one linker flags for sanitizers.
This commit is contained in:
Mike Hommey 2018-08-17 08:55:19 +09:00
Родитель 6f1f972c02
Коммит 7b448e6258
3 изменённых файлов: 2 добавлений и 19 удалений

Просмотреть файл

@ -8,7 +8,6 @@ dnl ========================================================
dnl = Link Time Optimization (LTO) dnl = Link Time Optimization (LTO)
dnl ======================================================== dnl ========================================================
if test -n "$MOZ_LTO"; then if test -n "$MOZ_LTO"; then
MOZ_LLVM_HACKS=1
AC_DEFINE(MOZ_LTO) AC_DEFINE(MOZ_LTO)
MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer) MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
@ -23,7 +22,6 @@ dnl ========================================================
dnl = Use Address Sanitizer dnl = Use Address Sanitizer
dnl ======================================================== dnl ========================================================
if test -n "$MOZ_ASAN"; then if test -n "$MOZ_ASAN"; then
MOZ_LLVM_HACKS=1
if test -n "$CLANG_CL"; then if test -n "$CLANG_CL"; then
# Look for the ASan runtime binary # Look for the ASan runtime binary
if test "$CPU_ARCH" = "x86_64"; then if test "$CPU_ARCH" = "x86_64"; then
@ -61,7 +59,6 @@ MOZ_ARG_ENABLE_BOOL(memory-sanitizer,
MOZ_MSAN=1, MOZ_MSAN=1,
MOZ_MSAN= ) MOZ_MSAN= )
if test -n "$MOZ_MSAN"; then if test -n "$MOZ_MSAN"; then
MOZ_LLVM_HACKS=1
CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS" CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS"
CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS" CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS"
if test -z "$CLANG_CL"; then if test -z "$CLANG_CL"; then
@ -80,7 +77,6 @@ MOZ_ARG_ENABLE_BOOL(thread-sanitizer,
MOZ_TSAN=1, MOZ_TSAN=1,
MOZ_TSAN= ) MOZ_TSAN= )
if test -n "$MOZ_TSAN"; then if test -n "$MOZ_TSAN"; then
MOZ_LLVM_HACKS=1
CFLAGS="-fsanitize=thread $CFLAGS" CFLAGS="-fsanitize=thread $CFLAGS"
CXXFLAGS="-fsanitize=thread $CXXFLAGS" CXXFLAGS="-fsanitize=thread $CXXFLAGS"
if test -z "$CLANG_CL"; then if test -z "$CLANG_CL"; then
@ -105,7 +101,6 @@ MOZ_ARG_ENABLE_BOOL(unsigned-overflow-sanitizer,
MOZ_UNSIGNED_OVERFLOW_SANITIZE= ) MOZ_UNSIGNED_OVERFLOW_SANITIZE= )
if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then
MOZ_LLVM_HACKS=1
MOZ_UBSAN=1 MOZ_UBSAN=1
SANITIZER_BLACKLISTS="" SANITIZER_BLACKLISTS=""
if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE"; then if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE"; then
@ -138,18 +133,6 @@ AC_SUBST(MOZ_UBSAN)
# The LLVM symbolizer is used by all sanitizers # The LLVM symbolizer is used by all sanitizers
AC_SUBST(LLVM_SYMBOLIZER) AC_SUBST(LLVM_SYMBOLIZER)
dnl ========================================================
dnl = Enable hacks required for LLVM instrumentations
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(llvm-hacks,
[ --enable-llvm-hacks Enable workarounds required for several LLVM instrumentations (default=no)],
MOZ_LLVM_HACKS=1,
MOZ_LLVM_HACKS= )
if test -n "$MOZ_LLVM_HACKS"; then
MOZ_NO_WLZDEFS=1
fi
AC_SUBST(MOZ_NO_WLZDEFS)
dnl ======================================================== dnl ========================================================
dnl = Test for whether the compiler is compatible with the dnl = Test for whether the compiler is compatible with the
dnl = given sanitize options. dnl = given sanitize options.

Просмотреть файл

@ -444,7 +444,7 @@ if test "$GNU_CC"; then
# Some tools like ASan use a runtime library that is only # Some tools like ASan use a runtime library that is only
# linked against executables, so we must allow undefined # linked against executables, so we must allow undefined
# symbols for shared objects in some cases. # symbols for shared objects in some cases.
if test -z "$MOZ_NO_WLZDEFS"; then if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN"; then
# Don't allow undefined symbols in libraries # Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
fi fi

Просмотреть файл

@ -610,7 +610,7 @@ if test "$GNU_CC"; then
# Some tools like ASan use a runtime library that is only # Some tools like ASan use a runtime library that is only
# linked against executables, so we must allow undefined # linked against executables, so we must allow undefined
# symbols for shared objects in some cases. # symbols for shared objects in some cases.
if test -z "$MOZ_NO_WLZDEFS"; then if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN"; then
# Don't allow undefined symbols in libraries # Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"