Bug 1484872 - Remove --enable-llvm-hacks. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 17 Aug 2018 08:55:19 +0900
changeset 490255 c708ad4f9e5c569aaec93f965cbc66838998da3c
parent 490254 beae65bb45a9b7d6fbd42ed8b8bb9ec991abda8b
child 490256 5a64b929a12201d978d98ede8e7a483b86a0d116
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1484872
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.
build/autoconf/sanitize.m4
js/src/old-configure.in
old-configure.in
--- a/build/autoconf/sanitize.m4
+++ b/build/autoconf/sanitize.m4
@@ -3,32 +3,30 @@ dnl License, v. 2.0. If a copy of the MP
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 AC_DEFUN([MOZ_CONFIG_SANITIZE], [
 
 dnl ========================================================
 dnl = Link Time Optimization (LTO)
 dnl ========================================================
 if test -n "$MOZ_LTO"; then
-    MOZ_LLVM_HACKS=1
     AC_DEFINE(MOZ_LTO)
     MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
 
     CFLAGS="$CFLAGS $MOZ_LTO_CFLAGS"
     CPPFLAGS="$CPPFLAGS $MOZ_LTO_CFLAGS"
     CXXFLAGS="$CXXFLAGS $MOZ_LTO_CFLAGS"
     LDFLAGS="$LDFLAGS $MOZ_LTO_LDFLAGS"
 fi
 AC_SUBST(MOZ_LTO)
 
 dnl ========================================================
 dnl = Use Address Sanitizer
 dnl ========================================================
 if test -n "$MOZ_ASAN"; then
-    MOZ_LLVM_HACKS=1
     if test -n "$CLANG_CL"; then
         # Look for the ASan runtime binary
         if test "$CPU_ARCH" = "x86_64"; then
           MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll
         else
           MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll
         fi
         # We use MOZ_PATH_PROG in order to get a Windows style path.
@@ -56,17 +54,16 @@ AC_SUBST(MOZ_ASAN)
 dnl ========================================================
 dnl = Use Memory Sanitizer
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(memory-sanitizer,
 [  --enable-memory-sanitizer       Enable Memory Sanitizer (default=no)],
     MOZ_MSAN=1,
     MOZ_MSAN= )
 if test -n "$MOZ_MSAN"; then
-    MOZ_LLVM_HACKS=1
     CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS"
     CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS"
     if test -z "$CLANG_CL"; then
         LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $LDFLAGS"
     fi
     AC_DEFINE(MOZ_MSAN)
     MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
 fi
@@ -75,17 +72,16 @@ AC_SUBST(MOZ_MSAN)
 dnl ========================================================
 dnl = Use Thread Sanitizer
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(thread-sanitizer,
 [  --enable-thread-sanitizer       Enable Thread Sanitizer (default=no)],
    MOZ_TSAN=1,
    MOZ_TSAN= )
 if test -n "$MOZ_TSAN"; then
-    MOZ_LLVM_HACKS=1
     CFLAGS="-fsanitize=thread $CFLAGS"
     CXXFLAGS="-fsanitize=thread $CXXFLAGS"
     if test -z "$CLANG_CL"; then
         LDFLAGS="-fsanitize=thread $LDFLAGS"
     fi
     AC_DEFINE(MOZ_TSAN)
     MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
 fi
@@ -100,17 +96,16 @@ MOZ_ARG_ENABLE_BOOL(signed-overflow-sani
    MOZ_SIGNED_OVERFLOW_SANITIZE=1,
    MOZ_SIGNED_OVERFLOW_SANITIZE= )
 MOZ_ARG_ENABLE_BOOL(unsigned-overflow-sanitizer,
 [  --enable-unsigned-overflow-sanitizer       Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts, default=no)],
    MOZ_UNSIGNED_OVERFLOW_SANITIZE=1,
    MOZ_UNSIGNED_OVERFLOW_SANITIZE= )
 
 if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then
-    MOZ_LLVM_HACKS=1
     MOZ_UBSAN=1
     SANITIZER_BLACKLISTS=""
     if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE"; then
         SANITIZER_BLACKLISTS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/ubsan_signed_overflow_blacklist.txt $SANITIZER_BLACKLISTS"
         CFLAGS="-fsanitize=signed-integer-overflow $CFLAGS"
         CXXFLAGS="-fsanitize=signed-integer-overflow $CXXFLAGS"
         if test -z "$CLANG_CL"; then
             LDFLAGS="-fsanitize=signed-integer-overflow $LDFLAGS"
@@ -134,26 +129,14 @@ fi
 AC_SUBST(MOZ_SIGNED_OVERFLOW_SANITIZE)
 AC_SUBST(MOZ_UNSIGNED_OVERFLOW_SANITIZE)
 AC_SUBST(MOZ_UBSAN)
 
 # The LLVM symbolizer is used by all sanitizers
 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 = Test for whether the compiler is compatible with the
 dnl = given sanitize options.
 dnl ========================================================
 AC_TRY_LINK(,,,AC_MSG_ERROR([compiler is incompatible with sanitize options]))
 
 ])
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -439,17 +439,17 @@ dnl ====================================
 if test "$GNU_CC"; then
     MKSHLIB='$(CXX) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     MKCSHLIB='$(CC) $(COMPUTED_C_LDFLAGS) $(PGO_CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     DSO_LDOPTS='-shared'
     if test "$GCC_USE_GNU_LD"; then
         # Some tools like ASan use a runtime library that is only
         # linked against executables, so we must allow undefined
         # 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
             DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
         fi
     fi
     WARNINGS_AS_ERRORS='-Werror'
     DSO_CFLAGS=''
 
     if test "$OS_ARCH" != "WINNT"; then
--- a/old-configure.in
+++ b/old-configure.in
@@ -605,17 +605,17 @@ if test "$GNU_CC"; then
       ;;
     esac
 
     DSO_LDOPTS='-shared'
     if test "$GCC_USE_GNU_LD"; then
         # Some tools like ASan use a runtime library that is only
         # linked against executables, so we must allow undefined
         # 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
             DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
 
             # BSDs need `environ' exposed for posix_spawn (bug 753046)
             case "$OS_TARGET" in
             DragonFly|FreeBSD|NetBSD|OpenBSD)
                 if test -n "$HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED"; then
                     DSO_LDOPTS="$DSO_LDOPTS -Wl,--ignore-unresolved-symbol,environ"