Skip to content

Commit 1c0084b

Browse files
committed
Build all products in build command
1 parent f4b17d2 commit 1c0084b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

build-script.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,11 @@ def __init__(
434434
self.verbose = verbose
435435
self.toolchain = toolchain
436436

437-
def build(self, product_name: str) -> None:
438-
print("** Building " + product_name + " **")
437+
def build(self, product_name: Optional[str] = None) -> None:
438+
print("** Building " + (product_name or "all products") + " **")
439439
command = list(self.swiftpm_call)
440-
command.extend(["--product", product_name])
440+
if product_name:
441+
command.extend(["--product", product_name])
441442

442443
env = dict(os.environ)
443444
env["SWIFT_BUILD_SCRIPT_ENVIRONMENT"] = "1"
@@ -761,12 +762,8 @@ def build_command(args: argparse.Namespace) -> None:
761762
verbose=args.verbose,
762763
disable_sandbox=args.disable_sandbox,
763764
)
764-
# Until rdar://53881101 is implemented, we cannot request a build of multiple
765-
# targets simultaneously. For now, just build one product after the other.
766-
builder.build("SwiftSyntax")
767-
builder.build("SwiftSyntaxParser")
768-
builder.build("SwiftSyntaxBuilder")
769-
builder.build("SwiftSyntaxBuilderGeneration")
765+
# Build all products.
766+
builder.build()
770767
except subprocess.CalledProcessError as e:
771768
fail_for_called_process_error("Building SwiftSyntax failed", e)
772769

0 commit comments

Comments
 (0)