linux: use -gline-tables-only instead of -g#201
Open
dylan-conway wants to merge 2 commits intomainfrom
Open
Conversation
Emit only DWARF line tables (file:line mapping) instead of full debug info. Backtraces and profilers still get file:line; only variable/type inspection in a debugger is lost, which release artifacts don't need. Shrinks the LTO bitcode debug-metadata graph that downstream Full-LTO links have to merge, optimize, and clone — should reduce Bun's link time noticeably since WebKit is the bulk of the merged module.
|
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 (1)
WalkthroughDefault compiler debug flags in two Docker build files are changed from Changes
🚥 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. Comment |
Preview Builds
|
These run at compile time per-TU on macOS (no LTO there), so they need to be in WebKit's own build rather than Bun's link flags. Linux gets the equivalent at Bun's LTO link, so this is macOS-only. - -enable-merge-functions: IR-level dedup of structurally-identical functions (template instantiations, thunks). Complements --icf at link. - -enable-machine-outliner=always: factor repeated instruction sequences into shared functions. Supported on AArch64 and x86.
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.

Emit only DWARF line tables (file:line mapping) instead of full debug info in the Linux release/LTO builds.
What's kept: backtraces, addr2line, profiler file:line all still work.
What's lost: variable/type inspection in gdb/lldb on the release artifacts (not used — debug builds are for that).
Why: WebKit's LTO bitcode is the bulk of Bun's merged Full-LTO module. The debug-metadata graph from
-ggets carried through IRMover, the inliner, andSplitModuleclones at link time. Reducing it to line tables should noticeably shrink the prebuilt and speed up Bun's release link.Linux only (Dockerfile + Dockerfile.musl); macOS untouched.