@@ -467,16 +467,6 @@ def use_windows_spawn_fix(self, platform=None):
467467 if os .name != "nt" :
468468 return # not needed, only for windows
469469
470- # On Windows, due to the limited command line length, when creating a static library
471- # from a very high number of objects SCons will invoke "ar" once per object file;
472- # that makes object files with same names to be overwritten so the last wins and
473- # the library loses symbols defined by overwritten objects.
474- # By enabling quick append instead of the default mode (replacing), libraries will
475- # got built correctly regardless the invocation strategy.
476- # Furthermore, since SCons will rebuild the library from scratch when an object file
477- # changes, no multiple versions of the same object file will be present.
478- self .Replace (ARFLAGS = "q" )
479-
480470 def mySubProcess (cmdline , env ):
481471 startupinfo = subprocess .STARTUPINFO ()
482472 startupinfo .dwFlags |= subprocess .STARTF_USESHOWWINDOW
@@ -500,19 +490,17 @@ def mySubProcess(cmdline, env):
500490 return rv
501491
502492 def mySpawn (sh , escape , cmd , args , env ):
493+ # Used by TEMPFILE.
494+ if cmd == "del" :
495+ os .remove (args [1 ])
496+ return 0
497+
503498 newargs = " " .join (args [1 :])
504499 cmdline = cmd + " " + newargs
505500
506501 rv = 0
507502 env = {str (key ): str (value ) for key , value in iter (env .items ())}
508- if len (cmdline ) > 32000 and cmd .endswith ("ar" ):
509- cmdline = cmd + " " + args [1 ] + " " + args [2 ] + " "
510- for i in range (3 , len (args )):
511- rv = mySubProcess (cmdline + args [i ], env )
512- if rv :
513- break
514- else :
515- rv = mySubProcess (cmdline , env )
503+ rv = mySubProcess (cmdline , env )
516504
517505 return rv
518506
0 commit comments