Skip to content

Commit 1148e26

Browse files
committedMay 22, 2024·
build: Build Swift SDK earlier than SwiftPM to allow SwiftPM to use it
Just built Swift SDK would be useful for SwiftPM to perform integration tests. All of those products do not depend on just built SwiftPM (WasmKit is built using host tools), so it is safe to build them earlier.

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed
 

‎utils/swift_build_support/swift_build_support/build_script_invocation.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,21 @@ def compute_product_pipelines(self):
657657
# Begin the post build-script-impl build phase.
658658
builder.begin_pipeline()
659659

660+
builder.add_product(products.WASILibc,
661+
is_enabled=self.args.build_wasmstdlib)
662+
builder.add_product(products.WasmLLVMRuntimeLibs,
663+
is_enabled=self.args.build_wasmstdlib)
664+
builder.add_product(products.WasmThreadsLLVMRuntimeLibs,
665+
is_enabled=self.args.build_wasmstdlib)
666+
builder.add_product(products.WasmKit,
667+
is_enabled=self.args.build_wasmkit)
668+
builder.add_product(products.WasmStdlib,
669+
is_enabled=self.args.build_wasmstdlib)
670+
builder.add_product(products.WasmThreadsStdlib,
671+
is_enabled=self.args.build_wasmstdlib)
672+
builder.add_product(products.WasmSwiftSDK,
673+
is_enabled=self.args.build_wasmstdlib)
674+
660675
builder.add_product(products.SwiftPM,
661676
is_enabled=self.args.build_swiftpm)
662677
builder.add_product(products.SwiftSyntax,
@@ -683,20 +698,6 @@ def compute_product_pipelines(self):
683698
is_enabled=self.args.install_swiftdocc)
684699
builder.add_product(products.MinimalStdlib,
685700
is_enabled=self.args.build_minimalstdlib)
686-
builder.add_product(products.WASILibc,
687-
is_enabled=self.args.build_wasmstdlib)
688-
builder.add_product(products.WasmLLVMRuntimeLibs,
689-
is_enabled=self.args.build_wasmstdlib)
690-
builder.add_product(products.WasmThreadsLLVMRuntimeLibs,
691-
is_enabled=self.args.build_wasmstdlib)
692-
builder.add_product(products.WasmKit,
693-
is_enabled=self.args.build_wasmkit)
694-
builder.add_product(products.WasmStdlib,
695-
is_enabled=self.args.build_wasmstdlib)
696-
builder.add_product(products.WasmThreadsStdlib,
697-
is_enabled=self.args.build_wasmstdlib)
698-
builder.add_product(products.WasmSwiftSDK,
699-
is_enabled=self.args.build_wasmstdlib)
700701

701702
# Keep SwiftDriver at last.
702703
# swift-driver's integration with the build scripts is not fully

0 commit comments

Comments
 (0)
Please sign in to comment.