Skip to content

Commit 9143a56

Browse files
committed
Install swift-system into the toolchain in CMake build install action
#915 added a CMake dependency on swift-system. Since then, the CMake build of the driver builds swift-system, but when the `install` action is triggered, the dependency's module and shared library are not installed into the toolchain. As a result, built toolchains are unable to invoke swift-driver due to the missing dylib. This ensures that much like other driver dependencies (TSC, ArgumentParser), we also install SwiftSystem. Resolves rdar://86754758
1 parent fc4a83a commit 9143a56

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Utilities/build-script-helper.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ def install_swiftdriver(args, build_dir, prefix, targets) :
254254

255255
# Binary Swift Modules:
256256
# swift-driver: SwiftDriver.swiftmodule, SwiftOptions.swiftmodule
257-
# TODO: swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
258257
# swift-tools-support-core: TSCUtility.swiftmodule, TSCLibc.swiftmodule, TSCBasic.swiftmodule
258+
# swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
259+
# swift-system: SystemPackage.swiftmodule
259260
install_binary_swift_modules(args, build_dir, install_lib, targets)
260261

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

337+
# Instal 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+
# Instal the swift-argument-parser shared library into the toolchain lib
336343
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser')
337344
install_library(args, build_dir, package_subpath, 'libArgumentParser',
338345
universal_lib_dir, toolchain_lib_dir,'swift-argument-parser', targets)
339346

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

388+
# swift-system
389+
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-system',
390+
product_subpath)
391+
install_module(args, build_dir, package_subpath, toolchain_lib_dir, 'SystemPackage', targets)
392+
393+
380394
# Install the modulemaps and headers of the driver's C module dependencies into the toolchain
381395
# include directory
382396
def install_c_module_includes(args, build_dir, toolchain_include_dir):

0 commit comments

Comments
 (0)