Switch from full LTO to ThinLTO#208
Closed
dylan-conway wants to merge 3 commits intomainfrom
Closed
Conversation
ThinLTO parallelizes the link-time optimization step and produces incrementally-cacheable bitcode, which should significantly cut LTO build times while keeping -fwhole-program-vtables devirtualization. Updated all -flto=full sites: - .github/workflows/build-reusable.yml (linux + musl lto matrix entries) - Dockerfile / Dockerfile.musl default LTO_FLAG - build.ts lto config
2 tasks
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughReplaces full LTO ( ChangesLTO flag migration
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
add-apt-repository ppa:... queries launchpad.net/api/1.0 to discover the PPA signing key, and hard-fails with the misleading error "'~ubuntu-toolchain-r' user or team does not exist" whenever that API is slow or unreachable. Fetch the (well-known, stable) signing key from keyserver.ubuntu.com over HTTPS and write the sources.list entry directly, matching the pattern already used for the Kitware repo above.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Dockerfile`:
- Around line 62-63: The PPA GPG key is being installed into
/etc/apt/trusted.gpg.d (global trust); change it to a dedicated keyring and
reference it with signed-by on the deb line: download the key from the same URL
and dearmor it into a dedicated file like
/usr/share/keyrings/ubuntu-toolchain-r-archive-keyring.gpg, then update the deb
line that currently writes to /etc/apt/sources.list.d/ubuntu-toolchain-r.list to
include "signed-by=/usr/share/keyrings/ubuntu-toolchain-r-archive-keyring.gpg"
so the key is scoped only to the ubuntu-toolchain-r/test source.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Preview Builds
|
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.
Switches all
-flto=fullcall sites to-flto=thinso we can evaluate ThinLTO for Bun's release builds.Why
bun build.ts ltorebuilds should get much faster after the first build.-fwhole-program-vtables/-fforce-emit-vtablesare kept — clang supports whole-program devirtualization under ThinLTO via the summary index, so we shouldn't lose the vtable opts.What changed
.github/workflows/build-reusable.yml— all 6*-ltomatrix entries (linux glibc + musl, amd64/arm64/baseline)Dockerfile/Dockerfile.musl— defaultLTO_FLAGargbuild.ts—ltoconfig for local builds (Windows + Unix paths)Not touched
Source/cmake/WebKitCompilerFlags.cmakealready parameterizes onLTO_MODEand isn't used by our build path.Opening this so the preview-build workflow produces
autobuild-preview-pr-*artifacts we can pull into Bun and benchmark against the current full-LTO release.