Lines 1008-1014
Link Here
|
1008 |
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. |
1008 |
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. |
1009 |
env.Append( CCFLAGS=["-fPIC", |
1009 |
env.Append( CCFLAGS=["-fPIC", |
1010 |
"-fno-strict-aliasing", |
1010 |
"-fno-strict-aliasing", |
1011 |
"-ggdb", |
|
|
1012 |
"-pthread", |
1011 |
"-pthread", |
1013 |
"-Wall", |
1012 |
"-Wall", |
1014 |
"-Wsign-compare", |
1013 |
"-Wsign-compare", |
Lines 1016-1028
Link Here
|
1016 |
"-Winvalid-pch"] ) |
1015 |
"-Winvalid-pch"] ) |
1017 |
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet |
1016 |
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet |
1018 |
if linux or darwin: |
1017 |
if linux or darwin: |
1019 |
env.Append( CCFLAGS=["-pipe"] ) |
|
|
1020 |
if not has_option("disable-warnings-as-errors"): |
1018 |
if not has_option("disable-warnings-as-errors"): |
1021 |
env.Append( CCFLAGS=["-Werror"] ) |
1019 |
env.Append( CCFLAGS=["-Werror"] ) |
1022 |
|
1020 |
|
1023 |
env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) |
1021 |
env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) |
1024 |
env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) |
|
|
1025 |
env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) |
1022 |
env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) |
|
|
1023 |
env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) |
1024 |
env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) |
1026 |
|
1025 |
|
1027 |
# SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program |
1026 |
# SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program |
1028 |
# startup. |
1027 |
# startup. |
Lines 1039-1045
Link Here
|
1039 |
if not darwin: |
1038 |
if not darwin: |
1040 |
env.Append( LINKFLAGS=["-rdynamic"] ) |
1039 |
env.Append( LINKFLAGS=["-rdynamic"] ) |
1041 |
|
1040 |
|
1042 |
env.Append( LIBS=[] ) |
1041 |
env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) |
1043 |
|
1042 |
|
1044 |
#make scons colorgcc friendly |
1043 |
#make scons colorgcc friendly |
1045 |
for key in ('HOME', 'TERM'): |
1044 |
for key in ('HOME', 'TERM'): |
Lines 1053-1063
Link Here
|
1053 |
env.Append( CPPDEFINES=["MONGO_GCOV"] ) |
1052 |
env.Append( CPPDEFINES=["MONGO_GCOV"] ) |
1054 |
env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " ) |
1053 |
env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " ) |
1055 |
|
1054 |
|
1056 |
if optBuild: |
|
|
1057 |
env.Append( CCFLAGS=["-O3"] ) |
1058 |
else: |
1059 |
env.Append( CCFLAGS=["-O0"] ) |
1060 |
|
1061 |
if debugBuild: |
1055 |
if debugBuild: |
1062 |
if not optBuild: |
1056 |
if not optBuild: |
1063 |
env.Append( CCFLAGS=["-fstack-protector"] ) |
1057 |
env.Append( CCFLAGS=["-fstack-protector"] ) |