Skip to content

Commit ad2b934

Browse files
committed
[new-bootstrap] Add install action
1 parent 75d21a5 commit ad2b934

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Utilities/new-bootstrap

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,19 @@ def bootstrap(args):
205205
else:
206206
llbuild_dir = os.path.join(args.llbuild_build_dir, "cmake/modules")
207207
llbuild_arg = "-DLLBuild_DIR=" + llbuild_dir
208+
209+
swiftpm_build_path = os.path.join(args.target_path, args.conf)
210+
208211
cmd = [
209212
"cmake", "-G", "Ninja",
210213
"-DCMAKE_BUILD_TYPE:=Debug",
211214
"-DCMAKE_C_COMPILER:=clang",
212215
llbuild_arg,
213216
"-DCMAKE_Swift_FLAGS=" + cmake_swift_flags,
214217
"-DUSE_VENDORED_TSC=ON",
215-
g_project_root
218+
"-DSWIFTPM_BUILD_DIR=" + swiftpm_build_path,
219+
"-DCMAKE_INSTALL_PREFIX=" + args.install_prefixes[0],
220+
g_project_root,
216221
]
217222
print(' '.join(cmd))
218223
subprocess.check_call(cmd, cwd=bootstrap_path)
@@ -306,6 +311,7 @@ def main():
306311

307312
build_target = "x86_64-apple-macosx"
308313
args.target_path = os.path.join(args.build_path, build_target)
314+
args.conf = 'debug' if args.release else 'release'
309315

310316
if "build-pd" in build_actions:
311317
build_runtimes_only(args)
@@ -326,5 +332,8 @@ def main():
326332
# Build SwiftPM with the bootstrapped version.
327333
build_swiftpm(args)
328334

335+
if "install" in build_actions:
336+
subprocess.check_call(["ninja", "install"], cwd=args.bootstrap_path)
337+
329338
if __name__ == '__main__':
330339
main()

0 commit comments

Comments
 (0)