Bug 1419607 Specify -fno-common for ASAN builds r=glandium,tsmith
authorTom Ritter <tom@mozilla.com>
Tue, 16 Jan 2018 08:00:31 -0600
changeset 454302 6803a23209cdc4ed5039a28be59ff2a471129afb
parent 454301 996ab2dc94f500c19d6bc1d49e27afae89736415
child 454303 a88543d4c4ac6910973b578ef7c4b97419a52108
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, tsmith
bugs1419607
milestone59.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 1419607 Specify -fno-common for ASAN builds r=glandium,tsmith MozReview-Commit-ID: JCXLNeQkGpq
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1339,16 +1339,21 @@ def security_hardening_cflags(hardening_
         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:
+        flags.append("-fno-common")
+
     return namespace(
         flags=flags,
         js_flags=js_flags,
     )
 
 
 add_old_configure_assignment('MOZ_HARDENING_CFLAGS', security_hardening_cflags.flags)
 add_old_configure_assignment('MOZ_HARDENING_CFLAGS_JS', security_hardening_cflags.js_flags)