Bug 1525588 - Do not enable CFG on ARM builds, as it causes undiagnosed failures. r=dmajor a=lizzard
authorTom Ritter <tom@mozilla.com>
Wed, 06 Feb 2019 11:42:24 -0600
changeset 515848 65897ef66dab39586e19111abad97815c587a15e
parent 515847 76698f80b156046fab7d43d6517dddc95a702bc6
child 515849 b139b2375450647bd84fe6e334dd54cefe51cc27
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor, lizzard
bugs1525588
milestone66.0
Bug 1525588 - Do not enable CFG on ARM builds, as it causes undiagnosed failures. r=dmajor a=lizzard
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1706,17 +1706,19 @@ def security_hardening_cflags(hardening_
         # ASLR ------------------------------------------------
         # ASLR (dynamicbase) is enabled by default in clang-cl; but the
         # mingw-clang build requires it to be explicitly enabled
         if target.os == 'WINNT' and c_compiler.type == 'clang':
             ldflags.append("-Wl,--dynamicbase")
             js_ldflags.append("-Wl,--dynamicbase")
 
         # Control Flow Guard (CFG) ----------------------------
-        if c_compiler.type == 'clang-cl' and c_compiler.version >= '8':
+        # See Bug 1525588 for why this doesn't work on Windows ARM
+        if c_compiler.type == 'clang-cl' and c_compiler.version >= '8' and \
+           target.cpu != 'aarch64':
             flags.append("-guard:cf")
             js_flags.append("-guard:cf")
             # nolongjmp is needed because clang doesn't emit the CFG tables of
             # setjmp return addresses https://bugs.llvm.org/show_bug.cgi?id=40057
             ldflags.append("-guard:cf,nolongjmp")
             js_ldflags.append("-guard:cf,nolongjmp")
 
     # ----------------------------------------------------------