diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-10-25 13:38:20 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-10-25 16:26:48 -0400 |
commit | 61cdb80fdc42e57c570066b17f0712c62b68db61 (patch) | |
tree | fea44fc27c9591846242e25fae620d853a2de7f4 /SConstruct | |
parent | 3fa49ade000f010f5e7b68c81c02c67fc0db4060 (diff) | |
download | mongo-61cdb80fdc42e57c570066b17f0712c62b68db61.tar.gz |
SERVER-37640 Ensure we don't use OSX symbols above our target version
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 62ab953f16e..d88dc9de65a 100644 --- a/SConstruct +++ b/SConstruct @@ -2247,6 +2247,12 @@ def doConfigure(myenv): myenv.Append( CXXFLAGS=["-Wnon-virtual-dtor"] ) conf.Finish() + # As of XCode 9, this flag must be present (it is not enabled + # by -Wall), in order to enforce that -mXXX-version-min=YYY + # will enforce that you don't use APIs from ZZZ. + if env.TargetOSIs('darwin'): + AddToCCFLAGSIfSupported(env, '-Wunguarded-availability') + if get_option('runtime-hardening') == "on": # Enable 'strong' stack protection preferentially, but fall back to 'all' if it is not # available. Note that we need to add these to the LINKFLAGS as well, since otherwise we |