Bug 1443898 Add -Xclang when passing fno-common to clang-cl r=glandium
authorTom Ritter <tom@mozilla.com>
Tue, 13 Mar 2018 10:32:15 -0500
changeset 408988 d5f031bf5d27da7f8567195174d24f3d11a61918
parent 408987 9bdac68266e290963ad3a47cad717339345d1f8a
child 408989 e63bab1349dd3d2545f62327b5df4dcb5ada4c81
push id33671
push usercsabou@mozilla.com
push dateTue, 20 Mar 2018 22:23:32 +0000
treeherdermozilla-central@e2e874ceae78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1443898
milestone61.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 1443898 Add -Xclang when passing fno-common to clang-cl r=glandium MozReview-Commit-ID: Iz9gZENBwQo
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1349,16 +1349,19 @@ def security_hardening_cflags(hardening_
     # 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")
 
     return namespace(
         flags=flags,
         js_flags=js_flags,
     )