Repository navigation
macOS: build a real darwin-x64 baseline #34207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7b725f4
macOS: build a real darwin-x64 baseline
tobocop2 2d5a945
Run the test suite against the darwin-x64 baseline artifact
tobocop2 07648c6
Merge branch 'main' into claude/darwin-x64-baseline
tobocop2 44ecc29
Merge branch 'main' into claude/darwin-x64-baseline
tobocop2 6c2f80f
Merge branch 'main' into claude/darwin-x64-baseline
tobocop2 b0435a7
Merge branch 'main' into claude/darwin-x64-baseline
tobocop2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 14910
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 1440
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 11124
🌐 Web query:
Bun WebKit baseline artifact bun-darwin-x64-baseline baseline-LTO WebKit autobuild💡 Result:
The
bun-darwin-x64-baselineartifact in Bun is intended to provide a version of the Bun runtime compatible with older Intel processors (pre-Haswell, such as Ivy Bridge) that lack support for advanced instruction sets like AVX2 and BMI2 [1][2]. However, historically, this artifact has faced technical issues regarding its WebKit dependency. Because Bun relies on a prebuilt WebKit library, a true "baseline" macOS x64 binary requires that the linked WebKit library also be compiled for a baseline CPU target (e.g.,-march=nehalem) [3][4]. In the past, thebun-darwin-x64-baselineartifact was often incorrectly linked against the standard "modern" macOS WebKit (which includes BMI2 instructions likeshlx), causing the Bun binary to crash with anSIGILL(Illegal Instruction) error upon launch on older CPUs [3][1]. Key points regarding these artifacts include: * Architecture Compatibility: The standard Bun binary requires AVX2 support [2]. The-baselinesuffix signifies a build intended for CPUs that lack these instructions [2]. * WebKit Linking: Bun's build system uses specific suffixes (such as-baseline,-lto, or-musl) to select the appropriate prebuilt WebKit artifact [4][5]. For Linux and Windows x64, dedicated baseline WebKit artifacts exist [4]. For macOS, the lack of a corresponding baseline WebKit artifact has previously led to thebun-darwin-x64-baselinebinary essentially acting as a non-baseline build, which can trigger crashes on unsupported hardware [3][6]. * Build System Enforcement: To prevent the distribution of misleading artifacts, the Bun build system has been updated to reject the creation of macOS "baseline" binaries unless a genuinely compatible baseline WebKit artifact is available [3]. * LTO (Link Time Optimization): Thebaseline-LTOterminology refers to a configuration that combines the baseline CPU target requirements with Link Time Optimization for performance. WebKit artifacts are often built with either LTO or debug symbols, and the build system ensures the suffix matches the artifact to avoid linking mismatches [4][5]. As of recent updates, the development team has been working on introducing specific baseline macOS WebKit lanes to properly resolve these crashes and provide a functional baseline experience for older macOS hardware [6].Citations:
@oven/bun-darwin-x64-baselineis byte-identical to the AVX2 default #34206🏁 Script executed:
Repository: oven-sh/bun
Length of output: 3058
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 612
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 16062
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 34822
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 18811
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 14080
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 2123
🏁 Script executed:
Repository: oven-sh/bun
Length of output: 1739
Gate the darwin x64 baseline lanes until the matching WebKit tarball lands. The pinned
autobuild-4895f45dfbd0d1226c4d41799887bc0ecb9f341brelease only hasbun-webkit-macos-amd64.tar.gzandbun-webkit-macos-amd64-lto.tar.gz; it does not publishbun-webkit-macos-amd64-baseline.tar.gzorbun-webkit-macos-amd64-baseline-lto.tar.gz, so the build will fail when fetching WebKit.🤖 Prompt for AI Agents