Skip to content

Install swift-system into the toolchain during CMake build's install action #953

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
Dec 22, 2021
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
16 changes: 15 additions & 1 deletion Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ def install_swiftdriver(args, build_dir, prefix, targets) :

# Binary Swift Modules:
# swift-driver: SwiftDriver.swiftmodule, SwiftOptions.swiftmodule
# TODO: swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
# swift-tools-support-core: TSCUtility.swiftmodule, TSCLibc.swiftmodule, TSCBasic.swiftmodule
# swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
# swift-system: SystemPackage.swiftmodule
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the swiftmodule required? Do you expect to be building against the installed version of swift-driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential clients of libSwiftDriver would need it if they try to use the toolchain's driver library instead of depending on it as a package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its an interesting question to understand who such clients are and if static vs dynamic linking of the dependencies is the right strategy.

Copy link
Contributor

@tomerd tomerd Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now 👍 to unblock the nightly toolchain tho

install_binary_swift_modules(args, build_dir, install_lib, targets)

# Modulemaps for C Modules:
Expand Down Expand Up @@ -333,10 +334,17 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, tar
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir, 'swift-tools-support-core', targets)

# Instal the swift-system shared library into the toolchain lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo copied 3 times: instal

package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-system')
install_library(args, build_dir, package_subpath, 'libSystemPackage',
universal_lib_dir, toolchain_lib_dir, 'swift-system', targets)

# Instal the swift-argument-parser shared library into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser')
install_library(args, build_dir, package_subpath, 'libArgumentParser',
universal_lib_dir, toolchain_lib_dir,'swift-argument-parser', targets)

# Instal the llbuild core shared libraries into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'llbuild')
for lib in ['libllbuildSwift', 'libllbuild']:
install_library(args, build_dir, package_subpath, lib,
Expand Down Expand Up @@ -377,6 +385,12 @@ def install_binary_swift_modules(args, build_dir, toolchain_lib_dir, targets):
product_subpath)
install_module(args, build_dir, package_subpath, toolchain_lib_dir, 'ArgumentParser', targets)

# swift-system
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-system',
product_subpath)
install_module(args, build_dir, package_subpath, toolchain_lib_dir, 'SystemPackage', targets)


# Install the modulemaps and headers of the driver's C module dependencies into the toolchain
# include directory
def install_c_module_includes(args, build_dir, toolchain_include_dir):
Expand Down