Skip to content

Revert the bootstrap changes to copy the SwiftPM-built universal PackageDescription and PackagePlugin libraries #3540

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
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
41 changes: 35 additions & 6 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,42 @@ def install_swiftpm(prefix, args):
dest = os.path.join(prefix, "libexec", "swift", "pm")
install_binary(args, "swiftpm-xctest-helper", dest)

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

# Install the PackagePlugin library and associated modules.
dest = os.path.join(prefix, "lib", "swift", "pm", "PluginAPI")
install_dylib(args, "PackagePlugin", dest, ["PackagePlugin"])
files_to_install = ["libPackageDescription" + g_shared_lib_suffix]
if platform.system() == 'Darwin':
files_to_install.append("PackageDescription.swiftinterface")
else:
files_to_install.append("PackageDescription.swiftmodule")
files_to_install.append("PackageDescription.swiftdoc")

for file in files_to_install:
src = os.path.join(runtime_lib_src, "ManifestAPI", file)
dest = os.path.join(runtime_lib_dest, "ManifestAPI", file)
mkdir_p(os.path.dirname(dest))

note("Installing %s to %s" % (src, dest))

file_util.copy_file(src, dest, update=1)

# Install PackagePlugin runtime libraries.
files_to_install = ["libPackagePlugin" + g_shared_lib_suffix]
if platform.system() == 'Darwin':
files_to_install.append("PackagePlugin.swiftinterface")
else:
files_to_install.append("PackagePlugin.swiftmodule")
files_to_install.append("PackagePlugin.swiftdoc")

for file in files_to_install:
src = os.path.join(runtime_lib_src, "PluginAPI", file)
dest = os.path.join(runtime_lib_dest, "PluginAPI", file)
mkdir_p(os.path.dirname(dest))

note("Installing %s to %s" % (src, dest))

file_util.copy_file(src, dest, update=1)


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