Backed out changeset 40d197664391 (bug 1503589) for causing windows MinGW build bustages. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Thu, 15 Nov 2018 12:32:54 +0200
changeset 446556 235c2ef758a1e21f0520c5fed9cc3d4564f56c57
parent 446555 922dd9f3b12d9d0a35336d383dfc02a6e504bd1a
child 446557 b97a83e789c28e4d10c67ce92d79a262d225caf5
push id35043
push userebalazs@mozilla.com
push dateThu, 15 Nov 2018 16:12:36 +0000
treeherdermozilla-central@59026ada59bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1503589
milestone65.0a1
backs out40d19766439121cd6d231dbee225243d14939db0
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
Backed out changeset 40d197664391 (bug 1503589) for causing windows MinGW build bustages. CLOSED TREE
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1576,27 +1576,27 @@ def security_hardening_cflags(hardening_
         if compiler_is_gccish and optimize and not asan:
             # Don't enable FORTIFY_SOURCE on Android on the top-level, but do enable in js/
             if target.os != 'Android':
                 flags.append("-U_FORTIFY_SOURCE")
                 flags.append("-D_FORTIFY_SOURCE=2")
             js_flags.append("-U_FORTIFY_SOURCE")
             js_flags.append("-D_FORTIFY_SOURCE=2")
 
-        # fstack-protector ------------------------------------
-        # Enable only if hardening is not disabled and ASAN is
-        # not on as ASAN will catch the crashes for us
-        if compiler_is_gccish and not asan:
-            flags.append("-fstack-protector-strong")
-
     # If ASAN _is_ on, undefine FOTIFY_SOURCE just to be safe
     if asan:
         flags.append("-U_FORTIFY_SOURCE")
         js_flags.append("-U_FORTIFY_SOURCE")
 
+    # fstack-protector ------------------------------------
+    # Enable only if --enable-hardening is passed and ASAN is
+    # not on as ASAN will catch the crashes for us
+    if hardening_flag and compiler_is_gccish and not asan:
+        flags.append("-fstack-protector-strong")
+
     # fno-common -----------------------------------------
     # Do not merge variables for ASAN; can detect some subtle bugs
     if asan:
         # clang-cl does not recognize the flag, it must be passed down to clang
         if c_compiler.type == 'clang-cl':
             flags.append("-Xclang")
         flags.append("-fno-common")