Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
Fixes #2346.
BUILD_BIN_DIRwas a recursive variable around$(shell swift build --show-bin-path), so every reference started SwiftPM again: 20 times formake all, about 12 s. It is now defined with:=, so each make process looks the path up once.This is the line #221 changed from
:=to=becauseBUILD_CONFIGURATIONchanges duringmake release. Going back is safe for the current Makefile: the recipes that use the path underreleaserun in the sub-make, which is started withBUILD_CONFIGURATION=releaseand resolves the release path when it parses the Makefile.STAGING_DIR,PKG_PATHandDSYM_DIRalready rely on that.One difference from
=: a recipe that reads$(BUILD_BIN_DIR)in the top-level make underreleasewould get the debug path. No target does that today, and none did when #221 landed:make -n releaseuses the release path both at #221 and at its parent commit.Testing
Tested locally
make -noutput forall,release,cli,dsymandcoverageis byte-identical before and after. All 8 bin paths inmake -n releasestay under.build/out/Products/Release.SwiftPM lookups in
make -n allgo from 20 to 2 (one per make process);coveragefrom 32 to 3;fmtandcleanfrom 6 to 1.time make -n all: 12.15 s, 11.98 s and 11.46 s before; 1.30 s, 1.37 s and 1.26 s after.make allandmake testpass.GNU Make 3.81, macOS 26.6.2, Xcode 27.0.