diff options
author | Alexander Neben <alexander.neben@mongodb.com> | 2022-12-13 17:56:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-13 18:10:39 +0000 |
commit | e500fa8527f3fb17cb4c5cb38e7cdcbd8021d207 (patch) | |
tree | d705fb75cc3f6eace01cd91e1ccffffd560c78cd | |
parent | 549900f16e9c93ddc0edcf682edb54c33b7f9cf2 (diff) | |
download | mongo-e500fa8527f3fb17cb4c5cb38e7cdcbd8021d207.tar.gz |
SERVER-71772 Made any aarch64 builds target armv8.2-a
-rw-r--r-- | SConstruct | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/SConstruct b/SConstruct index 47ae06c2ae5..9799d03f9ba 100644 --- a/SConstruct +++ b/SConstruct @@ -2235,20 +2235,23 @@ if get_option('ocsp-stapling') == 'on': # disable OCSP Stapling on Ubuntu 18.04 machines. See SERVER-51364 for more details. env.SetConfigHeaderDefine("MONGO_CONFIG_OCSP_STAPLING_ENABLED") -if env['TARGET_ARCH'] == 'i386': - # If we are using GCC or clang to target 32 bit, set the ISA minimum to 'nocona', - # and the tuning to 'generic'. The choice of 'nocona' is selected because it - # -- includes MMX extenions which we need for tcmalloc on 32-bit - # -- can target 32 bit - # -- is at the time of this writing a widely-deployed 10 year old microarchitecture - # -- is available as a target architecture from GCC 4.0+ - # However, we only want to select an ISA, not the nocona specific scheduling, so we - # select the generic tuning. For installations where hardware and system compiler rev are - # contemporaries, the generic scheduling should be appropriate for a wide range of - # deployed hardware. - - if env.ToolchainIs('GCC', 'clang'): +if env.ToolchainIs('GCC', 'clang'): + if env['TARGET_ARCH'] == 'i386': + # If we are using GCC or clang to target 32 bit, set the ISA minimum to 'nocona', + # and the tuning to 'generic'. The choice of 'nocona' is selected because it + # -- includes MMX extenions which we need for tcmalloc on 32-bit + # -- can target 32 bit + # -- is at the time of this writing a widely-deployed 10 year old microarchitecture + # -- is available as a target architecture from GCC 4.0+ + # However, we only want to select an ISA, not the nocona specific scheduling, so we + # select the generic tuning. For installations where hardware and system compiler rev are + # contemporaries, the generic scheduling should be appropriate for a wide range of + # deployed hardware. env.Append( CCFLAGS=['-march=nocona', '-mtune=generic'] ) + elif env['TARGET_ARCH'] == 'aarch64': + # If we are using GCC or clang to target aarch64, set the arch to be armv8.2-a, + # This is to prevent a bug with WT see SERVER-71772 for more details + env.Append( CCFLAGS=['-march=armv8.2-a', '-mtune=generic'] ) # Needed for auth tests since key files are stored in git with mode 644. if not env.TargetOSIs('windows'): |