Skip to content

linux: use -gline-tables-only instead of -g#201

Open
dylan-conway wants to merge 2 commits intomainfrom
claude/gline-tables-only-linux
Open

linux: use -gline-tables-only instead of -g#201
dylan-conway wants to merge 2 commits intomainfrom
claude/gline-tables-only-linux

Conversation

@dylan-conway
Copy link
Copy Markdown
Member

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 -g gets carried through IRMover, the inliner, and SplitModule clones 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.

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: eba187dc-321b-4fba-8d7c-653498877308

📥 Commits

Reviewing files that changed from the base of the PR and between 5115a2a and c4c672d.

📒 Files selected for processing (1)
  • .github/workflows/build-reusable.yml

Walkthrough

Default compiler debug flags in two Docker build files are changed from -g to -gline-tables-only. Additionally, the macOS Release build matrix in the CI workflow adds LLVM backend flags -mllvm -enable-merge-functions and -mllvm -enable-machine-outliner=always to certain matrix entries.

Changes

Cohort / File(s) Summary
Docker build files
Dockerfile, Dockerfile.musl
Replace -g with -gline-tables-only in DEFAULT_CFLAGS; downstream CFLAGS/CXXFLAGS inherit this change.
CI workflow (macOS build matrix)
.github/workflows/build-reusable.yml
Add LLVM backend options -mllvm -enable-merge-functions and -mllvm -enable-machine-outliner=always to matrix.cpp_flags for macOS Release entries (x86_64 and arm64 variants).
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description explains the technical change and rationale but lacks required template elements like Bugzilla issue link, explicit reviewer acknowledgment, and bullet-pointed file/function changes. Add Bugzilla issue link, formatted file/function changes list, and follow the WebKit PR template structure to meet contribution guidelines.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: replacing -g with -gline-tables-only for Linux builds, which is the primary modification in Dockerfile and Dockerfile.musl.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Preview Builds

Commit Release Date
5115a2a2 autobuild-preview-pr-201-5115a2a2 2026-04-26 04:25:06 UTC

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.
Copy link
Copy Markdown
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure about these llvm flags?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants