Skip to content

[Build Script Helper] Install libSwiftDriverExecution into the toolchain #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def install(args, build_dir):
# swift-driver and swift-help
install_executables(args, build_dir, bin_dir, toolchain_bin)

# libSwiftDriver and libSwiftOptions
# libSwiftDriver and libSwiftDriverExecution and libSwiftOptions
install_libraries(args, build_dir, lib_dir, toolchain_lib)

# Binary Swift Modules:
Expand Down Expand Up @@ -258,16 +258,17 @@ def install_executables(args, build_dir, universal_bin_dir, toolchain_bin_dir):

# Install shared libraries for the driver and its dependencies into the toolchain
def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir):
# Fixup the SwiftDriver rpath for libSwiftDriver
for arch in macos_target_architectures:
lib_path = os.path.join(build_dir, arch + '-apple-macos' + macos_deployment_target,
args.configuration, 'lib', 'libSwiftDriver' + shared_lib_ext)
driver_lib_dir_path = os.path.join(build_dir, arch + '-apple-macos' + macos_deployment_target,
args.configuration, 'lib')
delete_rpath(driver_lib_dir_path, lib_path, args.verbose)

# Fixup the TSC rpath for libSwiftDriver and libSwiftOptions
for lib in ['libSwiftDriver', 'libSwiftOptions']:
# Fixup the SwiftDriver rpath for libSwiftDriver and libSwiftDriverExecution
for lib in ['libSwiftDriver', 'libSwiftDriverExecution']:
for arch in macos_target_architectures:
lib_path = os.path.join(build_dir, arch + '-apple-macos' + macos_deployment_target,
args.configuration, 'lib', lib + shared_lib_ext)
driver_lib_dir_path = os.path.join(build_dir, arch + '-apple-macos' + macos_deployment_target,
args.configuration, 'lib')
delete_rpath(driver_lib_dir_path, lib_path, args.verbose)

# Fixup the TSC rpath for libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
for lib in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']:
for arch in macos_target_architectures:
lib_path = os.path.join(build_dir, arch + '-apple-macos' + macos_deployment_target,
args.configuration, 'lib', lib + shared_lib_ext)
Expand All @@ -276,9 +277,10 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir):
'swift-tools-support-core', 'lib')
delete_rpath(tsc_lib_dir_path, lib_path, args.verbose)

# Install the libSwiftDriver and libSwiftOptions shared libraries into the toolchain lib
# Install the libSwiftDriver and libSwiftOptions and libSwiftDriverExecution
# shared libraries into the toolchain lib
package_subpath = args.configuration
for lib in ['libSwiftDriver', 'libSwiftOptions']:
for lib in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']:
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir, 'swift-driver')

Expand Down