@@ -307,47 +307,16 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, tar
307
307
args .configuration , 'lib' )
308
308
delete_rpath (driver_lib_dir_path , lib_path , args .verbose )
309
309
310
- # Fixup the TSC and llbuild rpaths
311
- driver_libs = map (lambda d : os .path .join ('lib' , d ), ['libSwiftDriver' , 'libSwiftOptions' , 'libSwiftDriverExecution' ])
312
- tsc_libs = map (lambda d : os .path .join ('dependencies' , 'swift-tools-support-core' , 'lib' , d ),
313
- ['libTSCBasic' , 'libTSCLibc' , 'libTSCUtility' ])
314
- for lib in driver_libs + tsc_libs :
315
- for target in targets :
316
- lib_path = os .path .join (build_dir , target ,
317
- args .configuration , lib + shared_lib_ext )
318
- for dep in ['swift-tools-support-core' , 'llbuild' ]:
319
- lib_dir_path = os .path .join (build_dir , target ,
320
- args .configuration , 'dependencies' ,
321
- dep , 'lib' )
322
- delete_rpath (lib_dir_path , lib_path , args .verbose )
323
-
324
310
# Install the libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
325
311
# shared libraries into the toolchain lib
326
312
package_subpath = args .configuration
327
313
for lib in ['libSwiftDriver' , 'libSwiftOptions' , 'libSwiftDriverExecution' ]:
328
314
install_library (args , build_dir , package_subpath , lib ,
329
315
universal_lib_dir , toolchain_lib_dir , 'swift-driver' , targets )
330
316
331
- # Install the swift-tools-support core shared libraries into the toolchain lib
332
- package_subpath = os .path .join (args .configuration , 'dependencies' , 'swift-tools-support-core' )
333
- for lib in ['libTSCBasic' , 'libTSCLibc' , 'libTSCUtility' ]:
334
- install_library (args , build_dir , package_subpath , lib ,
335
- universal_lib_dir , toolchain_lib_dir , 'swift-tools-support-core' , targets )
336
-
337
- # Install the swift-system shared library into the toolchain lib
338
- package_subpath = os .path .join (args .configuration , 'dependencies' , 'swift-system' )
339
- install_library (args , build_dir , package_subpath , 'libSystemPackage' ,
340
- universal_lib_dir , toolchain_lib_dir , 'swift-system' , targets )
341
-
342
- # Install the swift-argument-parser shared libraries into the toolchain lib
343
- package_subpath = os .path .join (args .configuration , 'dependencies' , 'swift-argument-parser' )
344
- for lib in ['libArgumentParser' , 'libArgumentParserToolInfo' ]:
345
- install_library (args , build_dir , package_subpath , lib ,
346
- universal_lib_dir , toolchain_lib_dir ,'swift-argument-parser' , targets )
347
-
348
317
# Install the llbuild core shared libraries into the toolchain lib
349
318
package_subpath = os .path .join (args .configuration , 'dependencies' , 'llbuild' )
350
- for lib in ['libllbuildSwift' , ' libllbuild' ]:
319
+ for lib in ['libllbuild' ]:
351
320
install_library (args , build_dir , package_subpath , lib ,
352
321
universal_lib_dir , toolchain_lib_dir ,'llbuild' , targets )
353
322
@@ -475,7 +444,8 @@ def build_llbuild_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_f
475
444
'-DCMAKE_C_COMPILER:=clang' ,
476
445
'-DCMAKE_CXX_COMPILER:=clang++' ,
477
446
'-DCMAKE_CXX_FLAGS=-target %s' % target ,
478
- '-DLLBUILD_SUPPORT_BINDINGS:=Swift'
447
+ '-DLLBUILD_SUPPORT_BINDINGS:=Swift' ,
448
+ '-DBUILD_SHARED_LIBS=OFF'
479
449
]
480
450
if platform .system () == 'Darwin' :
481
451
flags .append ('-DCMAKE_OSX_ARCHITECTURES=%s' % target .split ('-' )[0 ])
@@ -496,9 +466,7 @@ def build_system_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_fl
496
466
print ('Building Swift Driver dependency: Swift System' )
497
467
system_source_dir = os .path .join (os .path .dirname (args .package_path ), 'swift-system' )
498
468
system_build_dir = os .path .join (build_dir , 'swift-system' )
499
- flags = [
500
- # requried due to swift-autolink-extract bug ("The file was not recognized as a valid object file")
501
- "-DBUILD_SHARED_LIBS=YES" ]
469
+ flags = ['-DBUILD_SHARED_LIBS=OFF' ]
502
470
system_cmake_flags = base_cmake_flags + flags
503
471
system_swift_flags = swift_flags [:]
504
472
cmake_build (args , swiftc_exec , system_cmake_flags , system_swift_flags ,
@@ -509,7 +477,8 @@ def build_tsc_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags
509
477
tsc_source_dir = os .path .join (os .path .dirname (args .package_path ), 'swift-tools-support-core' )
510
478
tsc_build_dir = os .path .join (build_dir , 'swift-tools-support-core' )
511
479
flags = [
512
- '-DSwiftSystem_DIR=' + os .path .join (os .path .join (build_dir , 'swift-system' ), 'cmake/modules' )]
480
+ '-DSwiftSystem_DIR=' + os .path .join (os .path .join (build_dir , 'swift-system' ), 'cmake/modules' ),
481
+ '-DBUILD_SHARED_LIBS=OFF' ]
513
482
tsc_cmake_flags = base_cmake_flags + flags
514
483
515
484
tsc_swift_flags = swift_flags [:]
@@ -539,7 +508,8 @@ def build_argument_parser_using_cmake(args, target, swiftc_exec, build_dir, base
539
508
print ('Building Swift Driver dependency: Argument Parser' )
540
509
parser_source_dir = os .path .join (os .path .dirname (args .package_path ), 'swift-argument-parser' )
541
510
parser_build_dir = os .path .join (build_dir , 'swift-argument-parser' )
542
- custom_flags = ['-DBUILD_TESTING=NO' , '-DBUILD_EXAMPLES=NO' ]
511
+ custom_flags = ['-DBUILD_TESTING=NO' , '-DBUILD_EXAMPLES=NO' ,
512
+ '-DBUILD_SHARED_LIBS=OFF' ]
543
513
parser_cmake_flags = base_cmake_flags + custom_flags
544
514
parser_swift_flags = swift_flags [:]
545
515
cmake_build (args , swiftc_exec , parser_cmake_flags , parser_swift_flags ,
@@ -558,7 +528,8 @@ def build_swift_driver_using_cmake(args, target, swiftc_exec, build_dir, base_cm
558
528
'-DTSC_DIR=' + os .path .join (os .path .join (dependencies_dir , 'swift-tools-support-core' ), 'cmake/modules' ),
559
529
'-DYams_DIR=' + os .path .join (os .path .join (dependencies_dir , 'yams' ), 'cmake/modules' ),
560
530
'-DArgumentParser_DIR=' + os .path .join (os .path .join (dependencies_dir , 'swift-argument-parser' ), 'cmake/modules' ),
561
- '-DSwiftSystem_DIR=' + os .path .join (os .path .join (dependencies_dir , 'swift-system' ), 'cmake/modules' )]
531
+ '-DSwiftSystem_DIR=' + os .path .join (os .path .join (dependencies_dir , 'swift-system' ), 'cmake/modules' ),
532
+ '-DBUILD_SHARED_LIBS=OFF' ]
562
533
driver_cmake_flags = base_cmake_flags + flags
563
534
cmake_build (args , swiftc_exec , driver_cmake_flags , driver_swift_flags ,
564
535
driver_source_dir , driver_build_dir )
0 commit comments