@@ -96,7 +96,7 @@ def add_option( name, help, nargs, contributesToVariantDir,
96
96
if type == 'choice' and not metavar :
97
97
metavar = '[' + '|' .join (choices ) + ']'
98
98
99
- AddOption ( "--" + name ,
99
+ AddOption ( "--" + name ,
100
100
dest = dest ,
101
101
type = type ,
102
102
nargs = nargs ,
@@ -133,7 +133,7 @@ def use_system_version_of_library(name):
133
133
134
134
def get_variant_dir ():
135
135
if has_option ('variant-dir' ):
136
- return "#build/" + get_option ('variant-dir' )
136
+ return "#build/" + get_option ('variant-dir' )
137
137
138
138
substitute = lambda x : re .sub ( "[:,\\ \\ /]" , "_" , x )
139
139
@@ -346,7 +346,7 @@ boostLibs = [ "thread" , "filesystem" , "program_options", "system" ]
346
346
onlyServer = len ( COMMAND_LINE_TARGETS ) == 0 or ( len ( COMMAND_LINE_TARGETS ) == 1 and str ( COMMAND_LINE_TARGETS [0 ] ) in [ "mongod" , "mongos" , "test" ] )
347
347
348
348
linux64 = False
349
- force32 = has_option ( "force32" )
349
+ force32 = has_option ( "force32" )
350
350
force64 = has_option ( "force64" )
351
351
if not force64 and not force32 and os .getcwd ().endswith ( "mongo-64" ):
352
352
force64 = True
@@ -436,9 +436,9 @@ else:
436
436
437
437
static = has_option ( "static" )
438
438
439
- noshell = has_option ( "noshell" )
439
+ noshell = has_option ( "noshell" )
440
440
441
- usev8 = has_option ( "usev8" )
441
+ usev8 = has_option ( "usev8" )
442
442
443
443
asio = has_option ( "asio" )
444
444
@@ -582,7 +582,7 @@ if has_option( "libpath" ):
582
582
if has_option ( "cpppath" ):
583
583
env ["CPPPATH" ] = [get_option ( "cpppath" )]
584
584
585
- env .Prepend ( CPPDEFINES = [ "_SCONS" ,
585
+ env .Prepend ( CPPDEFINES = [ "_SCONS" ,
586
586
"MONGO_EXPOSE_MACROS" ,
587
587
"SUPPORT_UTF8" ], # for pcre
588
588
@@ -688,8 +688,6 @@ elif linux:
688
688
689
689
if static :
690
690
env .Append ( LINKFLAGS = " -static " )
691
- if has_option ( "static-libstdc++" ):
692
- env .Append ( LINKFLAGS = ["-static-libstdc++" , "-static-libgcc" ] )
693
691
694
692
elif solaris :
695
693
env .Append ( CPPDEFINES = [ "__sunos__" ] )
@@ -739,7 +737,7 @@ elif windows:
739
737
# The this pointer is valid only within nonstatic member functions. It cannot be used in the initializer list for a base class.
740
738
# c4800
741
739
# 'type' : forcing value to bool 'true' or 'false' (performance warning)
742
- # This warning is generated when a value that is not bool is assigned or coerced into type bool.
740
+ # This warning is generated when a value that is not bool is assigned or coerced into type bool.
743
741
# c4267
744
742
# 'var' : conversion from 'size_t' to 'type', possible loss of data
745
743
# When compiling with /Wp64, or when compiling on a 64-bit operating system, type is 32 bits but size_t is 64 bits when compiling for 64-bit targets. To fix this warning, use size_t instead of a type.
@@ -761,12 +759,12 @@ elif windows:
761
759
762
760
env .Append ( CPPDEFINES = ["_CONSOLE" ,"_CRT_SECURE_NO_WARNINGS" ] )
763
761
764
- # this would be for pre-compiled headers, could play with it later
762
+ # this would be for pre-compiled headers, could play with it later
765
763
#env.Append( CCFLAGS=['/Yu"pch.h"'] )
766
764
767
765
# docs say don't use /FD from command line (minimal rebuild)
768
766
# /Gy function level linking (implicit when using /Z7)
769
- # /Z7 debug info goes into each individual .obj file -- no .pdb created
767
+ # /Z7 debug info goes into each individual .obj file -- no .pdb created
770
768
env .Append ( CCFLAGS = ["/Z7" , "/errorReport:none" ] )
771
769
772
770
# /DEBUG will tell the linker to create a .pdb file
@@ -822,6 +820,9 @@ elif windows:
822
820
823
821
if nix :
824
822
823
+ if has_option ( "static-libstdc++" ):
824
+ env .Append ( LINKFLAGS = ["-static-libstdc++" , "-static-libgcc" ] )
825
+
825
826
if has_option ( "distcc" ):
826
827
env ["CXX" ] = "distcc " + env ["CXX" ]
827
828
@@ -1378,7 +1379,7 @@ def doConfigure(myenv):
1378
1379
1379
1380
conf .env .Append (CPPDEFINES = [("BOOST_THREAD_VERSION" , "2" )])
1380
1381
1381
- # Note that on Windows with using-system-boost builds, the following
1382
+ # Note that on Windows with using-system-boost builds, the following
1382
1383
# FindSysLibDep calls do nothing useful (but nothing problematic either)
1383
1384
for b in boostLibs :
1384
1385
boostlib = "boost_" + b
@@ -1415,10 +1416,10 @@ def doConfigure(myenv):
1415
1416
env .Append ( CPPDEFINES = ["MONGO_SASL" ] )
1416
1417
1417
1418
if conf .env ['MONGO_BUILD_SASL_CLIENT' ] and not conf .CheckLibWithHeader (
1418
- "sasl2" ,
1419
- ["stddef.h" ,"sasl/sasl.h" ],
1420
- "C" ,
1421
- "sasl_version_info(0, 0, 0, 0, 0, 0);" ,
1419
+ "sasl2" ,
1420
+ ["stddef.h" ,"sasl/sasl.h" ],
1421
+ "C" ,
1422
+ "sasl_version_info(0, 0, 0, 0, 0, 0);" ,
1422
1423
autoadd = False ):
1423
1424
Exit (1 )
1424
1425
@@ -1482,7 +1483,7 @@ def doStyling( env , target , source ):
1482
1483
print ( "astyle 2.x needed, found:" + res )
1483
1484
Exit (- 1 )
1484
1485
1485
- files = utils .getAllSourceFiles ()
1486
+ files = utils .getAllSourceFiles ()
1486
1487
files = filter ( lambda x : not x .endswith ( ".c" ) , files )
1487
1488
1488
1489
cmd = "astyle --options=mongo_astyle " + " " .join ( files )
0 commit comments