diff options
author | Mike Hommey <mh@glandium.org> | 2022-01-04 22:50:03 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2022-01-04 22:50:03 +0000 |
commit | b2b41cff49ff1cf617cb8b35b408e4c00b765272 (patch) | |
tree | 07a86fa6104e6c251eb03d1792ca65fede81aa87 | |
parent | e065cad061d3a26717fe96eea6d2eac5ec8b674b (diff) | |
download | nss-hg-b2b41cff49ff1cf617cb8b35b408e4c00b765272.tar.gz |
Bug 1747772 - Allow to build using clang's integrated assembler. r=bbeurdouche
Since clang 9, NSS can build for x86_64 without the -fno-integrated-as
flag.
The tricky part is that clang versions are unreliable. For instance, a
check for "clang version 9 or more" would break building with Xcode
versions between 9.0 and 11.3.1 (because clang in those say it has
version >= 9, but they are actually clang versions between 4.0 and 8.0;
the clang version reflects the Xcode version, not the real clang version).
We do have a complicated version check in Firefox that works around
that, but I don't feel like porting this to NSS, so instead, allow
to set a gyp variable to force enable it, and let the Firefox build
system decide for itself.
Differential Revision: https://phabricator.services.mozilla.com/D134741
-rw-r--r-- | coreconf/config.gypi | 1 | ||||
-rw-r--r-- | lib/freebl/freebl.gyp | 4 | ||||
-rw-r--r-- | lib/freebl/freebl_base.gypi | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/coreconf/config.gypi b/coreconf/config.gypi index 31710abc5..7bae38ae4 100644 --- a/coreconf/config.gypi +++ b/coreconf/config.gypi @@ -136,6 +136,7 @@ 'coverage%': 0, 'softfp_cflags%': '', 'enable_draft_hpke%': 0, + 'force_integrated_as%': 0, }, 'target_defaults': { # Settings specific to targets should go here. diff --git a/lib/freebl/freebl.gyp b/lib/freebl/freebl.gyp index e7703baf8..72e1b9b73 100644 --- a/lib/freebl/freebl.gyp +++ b/lib/freebl/freebl.gyp @@ -17,7 +17,7 @@ '<(DEPTH)/exports.gyp:nss_exports' ], 'conditions': [ - [ 'cc_is_clang==1', { + [ 'cc_is_clang==1 and force_integrated_as!=1', { 'cflags': [ '-no-integrated-as', ], @@ -326,7 +326,7 @@ '<(DEPTH)/exports.gyp:nss_exports' ], 'conditions': [ - [ 'cc_is_clang==1', { + [ 'cc_is_clang==1 and force_integrated_as!=1', { 'cflags': [ '-no-integrated-as', ], diff --git a/lib/freebl/freebl_base.gypi b/lib/freebl/freebl_base.gypi index afbffac72..d3b71d7da 100644 --- a/lib/freebl/freebl_base.gypi +++ b/lib/freebl/freebl_base.gypi @@ -72,7 +72,7 @@ 'mpi/mp_comba.c', ], 'conditions': [ - [ 'cc_is_clang==1 and fuzz!=1 and coverage!=1', { + [ 'cc_is_clang==1 and fuzz!=1 and coverage!=1 and force_integrated_as!=1', { 'cflags': [ '-no-integrated-as', ], |