0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

SERVER-24388 Enforce no link warnings on darwin targets

This commit is contained in:
Andrew Morrow 2017-05-02 14:33:50 -04:00
parent f7942df347
commit d949767b4e

View File

@ -1597,7 +1597,12 @@ if env.TargetOSIs('posix'):
env.Append( CCFLAGS=["-Werror"] )
env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
env.Append( LINKFLAGS=["-pthread"] )
# On OS X, clang doesn't want the pthread flag at link time, or it
# issues warnings which make it impossible for us to declare link
# warnings as errors. See http://stackoverflow.com/a/19382663.
if not (env.TargetOSIs('darwin') and env.ToolchainIs('clang')):
env.Append( LINKFLAGS=["-pthread"] )
# SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
# startup.
@ -1627,11 +1632,11 @@ if env.TargetOSIs('posix'):
# Promote linker warnings into errors. We can't yet do this on OS X because its linker considers
# noall_load obsolete and warns about it.
if not env.TargetOSIs('darwin') and not has_option("disable-warnings-as-errors"):
if not has_option("disable-warnings-as-errors"):
env.Append(
LINKFLAGS=[
"-Wl,--fatal-warnings",
],
'-Wl,-fatal_warnings' if env.TargetOSIs('darwin') else "-Wl,--fatal-warnings",
]
)
mmapv1 = False