Repository navigation
Build a smaller CentOS 7 LLVM toolchain with compiler-rt - #4249
Merged
Merged
Conversation
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 4 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)❄️ No new flaky tests detected 🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: d7827aa | Docs | View more details | Give us feedback! |
Contributor
|
FIY, I've opened #4239 . It avoids centos 7 altogether (for building) |
morrisonlevi
marked this pull request as ready for review
September 30, 2026 13:16
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
morrisonlevi
enabled auto-merge (squash)
September 30, 2026 14:17
realFlowControl
approved these changes
Sep 30, 2026
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.
Description
The high-level goals here are:
-moutline-atomicsin C builds on aarch64 for cross-language LTO. The rust compiler already sets this, and cross-language LTO will not work if target features are different. To make this work we need a static compiler-rt. Cross-language LTO may allow us to optimize for size and speed better.libLLVM.soandlibclang-cpp.sowhich the various tools link against, instead of using static linking. It also buildsMinRelSizeinstead ofRelease, which has a smaller impact than the shared libraries extraction but it's still helpful.The new CentOS 7 arm64 base image has shrunk by roughly 1/4:
docker image lssizesha256:a03ac99e0e7187f1433a829baa87f3ea8c1953a026342573a870ff3e7a8040desha256:e6890d96f47cf4df43abef716784979ebd68377b3ce78e8136459ec8f9a66f47docker image lssizesha256:b1ceeb687c6c77fea75a8f325c0972f3338e65ee7adf39959a0d40da261e6beesha256:596856db14ac1293e601d987fd879626768bb188c0b1da758f34217a0502f589Future work
We can build Rust from source and have it use these same LLVM libraries and it will further shrink things.
Reviewer checklist