Conversation
Without this change, --baseline still built both the regular and baseline x64 targets on macOS. On non-AVX Intel Macs (Westmere, X5690), the regular bun-darwin-x64 target uses AVX2 and crashes with SIGILL. Now --single --baseline produces only the baseline binary as intended.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
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.
Issue for this PR
Closes #51472
Type of change
What does this PR do?
Both build scripts have a
--baselineflag that is supposed to narrow--singledown to the baseline target, but the filter for the regular target of the current platform ignored the flag and kept returningtrue. So--single --baselinebuilt two binaries.The fix makes the non-baseline branch of the filter return
!baselineFlag, so the flag actually selects one target.This bites on non-AVX Intel Macs: the regular
bun-darwin-x64binary traps with SIGILL there, so building it is wasted time. I hit it while trying to produce a working localcode for a Xeon X5690.How did you verify your code works?
On that X5690, before the change
--single --baselineprintedbuilding opencode-darwin-x64and thenbuilding opencode-darwin-x64-baseline. After it prints onlybuilding opencode-darwin-x64-baseline,dist/holds just that directory, and the resulting binary runs on the machine (--version→ 1.18.32, the build script's own smoke test passes).Also confirmed
--singlewithout--baselinestill picks the regular target, andbun typecheckis clean inpackages/opencodeandpackages/cli.Screenshots / recordings
n/a, build script only.
Checklist