@@ -471,27 +471,28 @@ def create_bootstrap_files(sandbox_path, args):
471
471
elif target .is_c and target .is_library :
472
472
# We have to use shared library for interpolation between Swift and C so we can't use static library for C Targets.
473
473
link_output_path = os .path .join (lib_dir , target .name + g_shared_lib_ext )
474
- link_command = ['clang' , ' ' .join (pipes .quote (o ) for o in objects ), '-shared' ,
475
- '-o' , pipes .quote (link_output_path )]
474
+ link_command = ['clang' ]
475
+ link_command .extend (objects )
476
+ link_command .extend (['-shared' , '-o' , link_output_path ])
476
477
elif target .is_c and not target .is_library :
477
478
error ("Executable C target not supported by bootstrap yet" )
478
479
elif target .is_swift and not target .is_library :
479
480
link_output_path = os .path .join (bin_dir , target .name )
480
481
481
482
link_command = [args .swiftc_path ,
482
- '-o' , pipes . quote ( link_output_path ) ]
483
+ '-o' , link_output_path ]
483
484
if args .sysroot :
484
485
link_command .extend (["-sdk" , args .sysroot ])
485
486
if platform .system () == 'Darwin' :
486
487
link_command .extend (["-target" , "x86_64-apple-macosx10.10" ])
487
- link_command .append ( ' ' . join ( pipes . quote ( o ) for o in objects ) )
488
+ link_command .extend ( objects )
488
489
for dependency in target .dependencies :
489
490
dep_target = target_map [dependency ]
490
491
if dep_target .is_swift :
491
492
dependency_lib_path = os .path .join (lib_dir , "%s.a" % dependency )
492
493
else :
493
494
dependency_lib_path = os .path .join (lib_dir , dependency + g_shared_lib_ext )
494
- link_command .append (pipes . quote ( dependency_lib_path ) )
495
+ link_command .append (dependency_lib_path )
495
496
linked_libraries .append (dependency_lib_path )
496
497
if platform .system () == 'Darwin' :
497
498
link_command .extend (["-Xlinker" , "-all_load" ])
0 commit comments