Skip to content

Commit 8d09436

Browse files
authored
[6.2][cherrypick]Add bootstrap option to install without building. (#9105)
- **Explanation**: 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. (See also #9106) - **Scope**: Makes a change to the bootstrap wrapper, so no behavioral changes by default. - **Issues**: Relevant to OpenBSD port in swiftlang/swift#78437 - **Original PRs**: #9050 - **Risk**: Minimal, since there are no behavioral changes by default. - **Testing**: Passed CI. - **Reviewers**: @jakepetroules
1 parent 742e5c2 commit 8d09436

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)