From 44ab1ff5240cd4dee9837aebb7a5239f0352c1d3 Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Tue, 19 Aug 2025 20:14:48 -0400 Subject: [PATCH] Add bootstrap option to install without building. This allows the build action to be decoupled from the install action, so packaging systems that expect to be able to do discrete installation steps post-build can do so cheaply, without having to effectively start the build over from scratch. This is only intended solely for that use-case, so this is not wired up to other part of the swiftpm build process and defaults to being disabled. --- Utilities/bootstrap | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index d6bdd3d2f2f..a39d8ca25e0 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -121,6 +121,10 @@ def add_global_args(parser): "--reconfigure", action="store_true", help="whether to always reconfigure cmake") + parser.add_argument( + "--install-only", + action="store_true", + default=False) @log_entry_exit def add_build_args(parser): @@ -494,7 +498,10 @@ def test(args): @log_entry_exit def install(args): """Builds SwiftPM, then installs its build products.""" - build(args) + if args.install_only: + parse_build_args(args) + else: + build(args) # Install swiftpm content in all of the passed prefixes. for prefix in args.install_prefixes: