Repository navigation
fix: build mimalloc after llvm stage 1 - #3
Merged
Merged
Conversation
Moves the `## Build mimalloc` block (and `mimalloc-musl-glue`) from before LLVM stage 1 to after the post-LLVM compiler swap. Fixes the musl phase 2 link failure with `ld.lld: Invalid summary version 13` on hosts whose system clang is newer than the toolchain's (e.g. Ubuntu noble's clang 23 building a toolchain with LLVM 22).
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.
Moves the
Build mimallocblock (andmimalloc-musl-glue) from beforeLLVM stage 1 to after the post-LLVM compiler swap.
Why
On hosts whose system clang is newer than the toolchain's (e.g. Ubuntu
noble's clang 23 building a toolchain with LLVM 22), musl phase 2 failed
to link with:
Mimalloc was built before LLVM stage 1, still by the system clang, so
the ThinLTO summary of its objects came out in the clang 23 format —
incompatible with lld from LLVM 22, which later links the library.
How
After the move, mimalloc is built with the freshly-built LLVM 22
toolchain; the summary is a matching version and the link succeeds.
build.sh: 92 lines added, 78 removed (step ordering).