diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-10-25 13:38:20 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-10-25 18:32:54 -0400 |
commit | fc8f1106f494f24cb2559aa22c11aa825523541f (patch) | |
tree | 2055d12ca32c4259d7865eb3e37a538b2a057985 /SConstruct | |
parent | dd4c4c1043f3e20618e536f96d4237691bfedd2f (diff) | |
download | mongo-fc8f1106f494f24cb2559aa22c11aa825523541f.tar.gz |
SERVER-37640 Ensure we don't use OSX symbols above our target version
(cherry picked from commit 61cdb80fdc42e57c570066b17f0712c62b68db61)
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 52095d8b70f..d1b982329c0 100644 --- a/SConstruct +++ b/SConstruct @@ -2232,6 +2232,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 |