@@ -235,11 +235,13 @@ def install_executables(args, build_dir, universal_bin_dir, toolchain_bin_dir):
235235 args .configuration , 'bin' , exe )
236236 driver_lib_dir_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
237237 args .configuration , 'lib' )
238- tsc_lib_dir_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
239- args .configuration , 'dependencies' ,
240- 'swift-tools-support-core' , 'lib' )
241238 delete_rpath (driver_lib_dir_path , exe_bin_path , args .verbose )
242- delete_rpath (tsc_lib_dir_path , exe_bin_path , args .verbose )
239+
240+ for lib in ['swift-tools-support-core' , 'swift-argument-parser' ]:
241+ lib_dir_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
242+ args .configuration , 'dependencies' ,
243+ lib , 'lib' )
244+ delete_rpath (lib_dir_path , exe_bin_path , args .verbose )
243245
244246 # Point to the installation toolchain's lib directory
245247 add_rpath ('@executable_path/../lib/swift/macosx' , exe_bin_path , args .verbose )
@@ -267,15 +269,19 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir):
267269 args .configuration , 'lib' )
268270 delete_rpath (driver_lib_dir_path , lib_path , args .verbose )
269271
270- # Fixup the TSC rpath for libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
271- for lib in ['libSwiftDriver' , 'libSwiftOptions' , 'libSwiftDriverExecution' ]:
272+ # Fixup the TSC and llbuild rpaths
273+ driver_libs = map (lambda d : os .path .join ('lib' , d ), ['libSwiftDriver' , 'libSwiftOptions' , 'libSwiftDriverExecution' ])
274+ tsc_libs = map (lambda d : os .path .join ('dependencies' , 'swift-tools-support-core' , 'lib' , d ),
275+ ['libTSCBasic' , 'libTSCLibc' , 'libTSCUtility' ])
276+ for lib in driver_libs + tsc_libs :
272277 for arch in macos_target_architectures :
273278 lib_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
274- args .configuration , 'lib' , lib + shared_lib_ext )
275- tsc_lib_dir_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
276- args .configuration , 'dependencies' ,
277- 'swift-tools-support-core' , 'lib' )
278- delete_rpath (tsc_lib_dir_path , lib_path , args .verbose )
279+ args .configuration , lib + shared_lib_ext )
280+ for dep in ['swift-tools-support-core' , 'llbuild' ]:
281+ lib_dir_path = os .path .join (build_dir , arch + '-apple-macos' + macos_deployment_target ,
282+ args .configuration , 'dependencies' ,
283+ dep , 'lib' )
284+ delete_rpath (lib_dir_path , lib_path , args .verbose )
279285
280286 # Install the libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
281287 # shared libraries into the toolchain lib
0 commit comments