Skip to content

Commit 4267d67

Browse files
3405691582jakepetroules
authored andcommitted
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.
1 parent a834937 commit 4267d67

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Utilities/bootstrap

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ def add_global_args(parser):
121121
"--reconfigure",
122122
action="store_true",
123123
help="whether to always reconfigure cmake")
124+
parser.add_argument(
125+
"--install-only",
126+
action="store_true",
127+
default=False)
124128

125129
@log_entry_exit
126130
def add_build_args(parser):
@@ -494,7 +498,10 @@ def test(args):
494498
@log_entry_exit
495499
def install(args):
496500
"""Builds SwiftPM, then installs its build products."""
497-
build(args)
501+
if args.install_only:
502+
parse_build_args(args)
503+
else:
504+
build(args)
498505

499506
# Install swiftpm content in all of the passed prefixes.
500507
for prefix in args.install_prefixes:

0 commit comments

Comments
 (0)