Skip to content
This repository was archived by the owner on Dec 4, 2026. It is now read-only.

Swift Build reuses its build description across runs; packages built with Swift Build by default - #13

Merged
designgears merged 2 commits into
x86simfrom
t3/parity-swbuild-incremental
Dec 1, 2026
Merged

designgears merged 2 commits into
x86simfrom
t3/parity-swbuild-incremental

Conversation

@designgears

Copy link
Copy Markdown

Packages built as Xcode builds them, and Swift Build builds that are incremental like Xcode's.

  • swbuild-events: per-run variables kept out of Swift Build's environment. Swift Build keys its build description by its environment too. The wrapper's events file path and the stand-in's notes path differ on every run, so every build computed a new description and reran each product's Info.plist, CopySwiftLibs and CodeSign tasks. Without them, a package's second build runs only PruneExplicitPrecompiledModules, as Apple's next build does. Xcode-project builds benefit as well.
  • Packages built with Swift Build by default. XCODEBUILD_PACKAGE_ENGINE=swiftpm brings back SwiftPM's own build.

Measured against Apple's goldens in x86sim's tests/xctest-parity, with packages built from empty derived data on both sides:

Scenario iOS tvOS watchOS visionOS
multi-swt 405 (4111 with SwiftPM) 393 416 388
multi-all 191 (363) 241 196 191
multi-sel-swt 137 (310) 137 137 137

Goes with x86sim's t3/parity-packages-swiftbuild PR.

🤖 Generated with Claude Code

designgears and others added 2 commits December 1, 2026 13:53
…environment

Swift Build keys its build description by the environment too: the wrapper's events file path (and the stand-in's
notes path), different on every run, made every build compute a new description and rerun each product's Info.plist,
CopySwiftLibs and CodeSign tasks. Without them a second build reuses the description as Xcode's does (a package's
next build: PruneExplicitPrecompiledModules only, as Apple's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…EBUILD_PACKAGE_ENGINE=swiftpm: SwiftPM's own build)

Measured against Apple's goldens (x86sim tests/xctest-parity, packages from empty derived data on both sides):
multi-swt 400 differences (4111 with SwiftPM's build), multi-all 200 (363), multi-sel-swt 137 (310) on iOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@designgears
designgears merged commit 5327281 into x86sim Dec 1, 2026
1 check passed
@designgears
designgears deleted the t3/parity-swbuild-incremental branch December 3, 2026 01:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant