Skip to content

Commit 9a52971

Browse files
committed
Revert the bootstrap changes to copy the SwiftPM-built universal PackageDescription and PackagePlugin libraries
This goes back to copying the CMake-built libraries instead of the SwiftPM-built ones. This means that they will be thin on macOS, built only for the architecture of the host on which they were built. This is temporary until the Xcode that is used on the builders is new enough to have the XCBuild support needed for emitting Swift module interfaces.
1 parent 2feb630 commit 9a52971

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

Utilities/bootstrap

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,13 +396,42 @@ def install_swiftpm(prefix, args):
396396
dest = os.path.join(prefix, "libexec", "swift", "pm")
397397
install_binary(args, "swiftpm-xctest-helper", dest)
398398

399-
# Install the PackageDescription library and associated modules.
400-
dest = os.path.join(prefix, "lib", "swift", "pm", "ManifestAPI")
401-
install_dylib(args, "PackageDescription", dest, ["PackageDescription"])
399+
# Install PackageDescription runtime libraries.
400+
runtime_lib_dest = os.path.join(prefix, "lib", "swift", "pm")
401+
runtime_lib_src = os.path.join(args.bootstrap_dir, "pm")
402402

403-
# Install the PackagePlugin library and associated modules.
404-
dest = os.path.join(prefix, "lib", "swift", "pm", "PluginAPI")
405-
install_dylib(args, "PackagePlugin", dest, ["PackagePlugin"])
403+
files_to_install = ["libPackageDescription" + g_shared_lib_suffix]
404+
if platform.system() == 'Darwin':
405+
files_to_install.append("PackageDescription.swiftinterface")
406+
else:
407+
files_to_install.append("PackageDescription.swiftmodule")
408+
files_to_install.append("PackageDescription.swiftdoc")
409+
410+
for file in files_to_install:
411+
src = os.path.join(runtime_lib_src, "ManifestAPI", file)
412+
dest = os.path.join(runtime_lib_dest, "ManifestAPI", file)
413+
mkdir_p(os.path.dirname(dest))
414+
415+
note("Installing %s to %s" % (src, dest))
416+
417+
file_util.copy_file(src, dest, update=1)
418+
419+
# Install PackagePlugin runtime libraries.
420+
files_to_install = ["libPackagePlugin" + g_shared_lib_suffix]
421+
if platform.system() == 'Darwin':
422+
files_to_install.append("PackagePlugin.swiftinterface")
423+
else:
424+
files_to_install.append("PackagePlugin.swiftmodule")
425+
files_to_install.append("PackagePlugin.swiftdoc")
426+
427+
for file in files_to_install:
428+
src = os.path.join(runtime_lib_src, "PluginAPI", file)
429+
dest = os.path.join(runtime_lib_dest, "PluginAPI", file)
430+
mkdir_p(os.path.dirname(dest))
431+
432+
note("Installing %s to %s" % (src, dest))
433+
434+
file_util.copy_file(src, dest, update=1)
406435

407436

408437
# Helper function that installs a dynamic library and a set of modules to a particular directory.

0 commit comments

Comments
 (0)