@@ -96,7 +96,7 @@ def add_option( name, help, nargs, contributesToVariantDir,
9696 if type == 'choice' and not metavar :
9797 metavar = '[' + '|' .join (choices ) + ']'
9898
99- AddOption ( "--" + name ,
99+ AddOption ( "--" + name ,
100100 dest = dest ,
101101 type = type ,
102102 nargs = nargs ,
@@ -133,7 +133,7 @@ def use_system_version_of_library(name):
133133
134134def get_variant_dir ():
135135 if has_option ('variant-dir' ):
136- return "#build/" + get_option ('variant-dir' )
136+ return "#build/" + get_option ('variant-dir' )
137137
138138 substitute = lambda x : re .sub ( "[:,\\ \\ /]" , "_" , x )
139139
@@ -346,7 +346,7 @@ boostLibs = [ "thread" , "filesystem" , "program_options", "system" ]
346346onlyServer = len ( COMMAND_LINE_TARGETS ) == 0 or ( len ( COMMAND_LINE_TARGETS ) == 1 and str ( COMMAND_LINE_TARGETS [0 ] ) in [ "mongod" , "mongos" , "test" ] )
347347
348348linux64 = False
349- force32 = has_option ( "force32" )
349+ force32 = has_option ( "force32" )
350350force64 = has_option ( "force64" )
351351if not force64 and not force32 and os .getcwd ().endswith ( "mongo-64" ):
352352 force64 = True
@@ -436,9 +436,9 @@ else:
436436
437437static = has_option ( "static" )
438438
439- noshell = has_option ( "noshell" )
439+ noshell = has_option ( "noshell" )
440440
441- usev8 = has_option ( "usev8" )
441+ usev8 = has_option ( "usev8" )
442442
443443asio = has_option ( "asio" )
444444
@@ -582,7 +582,7 @@ if has_option( "libpath" ):
582582if has_option ( "cpppath" ):
583583 env ["CPPPATH" ] = [get_option ( "cpppath" )]
584584
585- env .Prepend ( CPPDEFINES = [ "_SCONS" ,
585+ env .Prepend ( CPPDEFINES = [ "_SCONS" ,
586586 "MONGO_EXPOSE_MACROS" ,
587587 "SUPPORT_UTF8" ], # for pcre
588588
@@ -688,8 +688,6 @@ elif linux:
688688
689689 if static :
690690 env .Append ( LINKFLAGS = " -static " )
691- if has_option ( "static-libstdc++" ):
692- env .Append ( LINKFLAGS = ["-static-libstdc++" , "-static-libgcc" ] )
693691
694692elif solaris :
695693 env .Append ( CPPDEFINES = [ "__sunos__" ] )
@@ -739,7 +737,7 @@ elif windows:
739737 # The this pointer is valid only within nonstatic member functions. It cannot be used in the initializer list for a base class.
740738 # c4800
741739 # '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.
743741 # c4267
744742 # 'var' : conversion from 'size_t' to 'type', possible loss of data
745743 # 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:
761759
762760 env .Append ( CPPDEFINES = ["_CONSOLE" ,"_CRT_SECURE_NO_WARNINGS" ] )
763761
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
765763 #env.Append( CCFLAGS=['/Yu"pch.h"'] )
766764
767765 # docs say don't use /FD from command line (minimal rebuild)
768766 # /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
770768 env .Append ( CCFLAGS = ["/Z7" , "/errorReport:none" ] )
771769
772770 # /DEBUG will tell the linker to create a .pdb file
@@ -822,6 +820,9 @@ elif windows:
822820
823821if nix :
824822
823+ if has_option ( "static-libstdc++" ):
824+ env .Append ( LINKFLAGS = ["-static-libstdc++" , "-static-libgcc" ] )
825+
825826 if has_option ( "distcc" ):
826827 env ["CXX" ] = "distcc " + env ["CXX" ]
827828
@@ -1378,7 +1379,7 @@ def doConfigure(myenv):
13781379
13791380 conf .env .Append (CPPDEFINES = [("BOOST_THREAD_VERSION" , "2" )])
13801381
1381- # Note that on Windows with using-system-boost builds, the following
1382+ # Note that on Windows with using-system-boost builds, the following
13821383 # FindSysLibDep calls do nothing useful (but nothing problematic either)
13831384 for b in boostLibs :
13841385 boostlib = "boost_" + b
@@ -1415,10 +1416,10 @@ def doConfigure(myenv):
14151416 env .Append ( CPPDEFINES = ["MONGO_SASL" ] )
14161417
14171418 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);" ,
14221423 autoadd = False ):
14231424 Exit (1 )
14241425
@@ -1482,7 +1483,7 @@ def doStyling( env , target , source ):
14821483 print ( "astyle 2.x needed, found:" + res )
14831484 Exit (- 1 )
14841485
1485- files = utils .getAllSourceFiles ()
1486+ files = utils .getAllSourceFiles ()
14861487 files = filter ( lambda x : not x .endswith ( ".c" ) , files )
14871488
14881489 cmd = "astyle --options=mongo_astyle " + " " .join ( files )
0 commit comments