Skip to content

Show the linker's messages when a placement relink fails - #1478

Open
mgomes wants to merge 4 commits into
masterfrom
yori/vibe-234
Open

mgomes wants to merge 4 commits into
masterfrom
yori/vibe-234

Conversation

@mgomes

@mgomes mgomes commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1477 (VIBE-232), which adds the ELF relinker's fake toolchain these tests extend. Merge #1477 first; until then this diff includes its commits.

The placement relinkers ran cc with capture_output=True, check=True and dropped what it printed. A failed link stopped with a CalledProcessError that showed only the command (71 arguments for compare) and its exit status, so lld's actual error never reached the user, and warnings from links that worked were lost.

Each layout now keeps everything its link printed, warnings included, in link.log beside its binary, and a failed link stops with the last 20 lines of that log. This applies to the ELF relinker in downcase-placement, the Mach-O relinker in mixed-text-placement, and escape-layout/isolate.py. isolate.py already saved link.log but still failed with only the exit status, so it now links through the Mach-O relinker's shared helper.

For example, relinking compare from a capture that is missing the vibescript object now ends with:

pad-00032: the link exited with status 1; the end of …/layouts/pad-00032/link.log:
…
rust-lld: error: undefined symbol: <alloc::sync::Arc<vibescript::budget::Charge>>::drop_slow
>>> referenced by sync.rs:3030 (…/library/alloc/src/sync.rs:3030)
>>>               …/link/12-compare.compare.62d401bff7d3cc72-cgu.0.rcgu.o:(core::ptr::drop_glue::<vibescript::error::Error>)
…
rust-lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
collect2: error: ld returned 1 exit status

Yori added 3 commits December 2, 2026 01:05
relink.py captured cc's output and dropped it, so a failed link said
only that the command exited with status 1, and lld's warnings from
links that worked were lost. Each layout now keeps everything its link
printed in link.log, and a failed link stops the run with the last
lines of that log.
relink.py captured cc's output and dropped it, so a failed link raised
a CalledProcessError naming only the command and its exit status, and
ld's warnings from links that worked were lost. Each placement now
keeps everything its link printed in link.log, and a failed link
raises with the last lines of that log.
isolate.py already saved each link's output in link.log, but a failed
link still raised a CalledProcessError naming only the command and its
exit status. It now links through the Mach-O relinker's run_link, which
writes the same log and raises with its last lines.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T03:42:48.026920Z 2cbff85 Manual request
🔒 Security Review ✅ Completed 2026-12-02T06:14:12.834752Z 5d6166e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mgomes

mgomes commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 5d6166e5d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Conflicts:
#	benchmarks/mixed-text-placement/relink.py
@mgomes

mgomes commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 2cbff85c77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant