@@ -547,42 +547,30 @@ else:
547
547
config .swift_driver = (
548
548
"%r %s %s %s"
549
549
% (config .swift , mcp_opt , config .swift_test_options , config .swift_driver_test_options ))
550
-
551
550
if kIsWindows :
552
551
config .swift_driver += " -libc " + config .swift_stdlib_msvc_runtime
553
-
554
552
config .swiftc_driver = (
555
- "%r -g %s %s %s %s" % (
553
+ "%r %s %s %s %s" % (
556
554
config .swiftc ,
557
- '' if kIsWindows else '-no- toolchain-stdlib-rpath' ,
555
+ '' if kIsWindows else '-toolchain-stdlib-rpath' ,
558
556
mcp_opt ,
559
557
config .swift_test_options ,
560
558
config .swift_driver_test_options
561
559
)
562
560
)
563
-
564
561
# Parse the host triple.
565
562
(host_cpu , host_vendor , host_os , host_vers ) = re .match ('([^-]+)-([^-]+)-([^0-9-]+)(.*)' , config .host_triple ).groups ()
566
563
toolchain_lib_dir = make_path (config .swift_lib_dir , 'swift' , host_os )
567
- if kIsWindows :
568
- config .host_build_swift = (
569
- "%s -target %s -I %s -L %s" % (
570
- config .swiftc_driver ,
571
- config .host_triple ,
572
- config .swift_host_lib_dir ,
573
- config .swift_host_lib_dir ,
574
- )
575
- )
576
- else :
577
- config .host_build_swift = (
578
- "%s -target %s -g -no-toolchain-stdlib-rpath -I %s -L %s -Xlinker -rpath -Xlinker %s" % (
579
- config .swiftc_driver ,
580
- config .host_triple ,
581
- config .swift_host_lib_dir ,
582
- config .swift_host_lib_dir ,
583
- toolchain_lib_dir
584
- )
564
+ config .host_build_swift = (
565
+ "%s -target %s -g %s -I %s -L %s %s" % (
566
+ config .swiftc_driver ,
567
+ config .host_triple ,
568
+ '' if kIsWindows else '-no-toolchain-stdlib-rpath' ,
569
+ config .swift_host_lib_dir ,
570
+ config .swift_host_lib_dir ,
571
+ '' if kIsWindows else '-Xlinker -rpath -Xlinker {}' .format (toolchain_lib_dir )
585
572
)
573
+ )
586
574
587
575
config .substitutions .append ( ('%llvm_obj_root' , config .llvm_obj_root ) )
588
576
config .substitutions .append ( ('%swift-bin-dir' , config .swift_bin_dir ) )
0 commit comments