Skip to content

Silence llbc's output by default to prevent rustc's linker output warning#157399

Open
kulst wants to merge 1 commit into
rust-lang:mainfrom
kulst:llbc-linker-output-fix
Open

Silence llbc's output by default to prevent rustc's linker output warning#157399
kulst wants to merge 1 commit into
rust-lang:mainfrom
kulst:llbc-linker-output-fix

Conversation

@kulst
Copy link
Copy Markdown
Contributor

@kulst kulst commented Jun 3, 2026

#153968 recently made visible that the llvm-bitcode-linker (llbc) always emits messages to stdout even when linking successfully. Additionally, these messages use ANSI escape sequences for coloring, which don't get rendered correctly.

This patch fixes both.

  • It silences llbc's output by default and adds a verbosity command line argument to it (-v for verbose and -vv for very verbose, which can be added by using rustc's -Clink-arg= argument).
  • It also removes the ANSI escape sequences and makes the output more linker-like (by removing timestamps, tracing-level, tracing-target).

cc: @kjetilkjeka

@rustbot label +L-linker_messages +O-NVPTX

…ning

Make the linker quiet by default and add linker command line arguments
for explicit verbosity control:

- no flag: no tracing output is emitted during successful links
- `-v`: emit informational linker diagnostics
- `-vv`: emit tracing-level linker diagnostics

Also adjust the tracing formatter to produce linker-style output by disabling
ANSI color sequences and omitting timestamps, tracing levels, and tracing
targets.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 3, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu

@rustbot rustbot added L-linker_messages Lint: linker_messages O-NVPTX Target: the NVPTX LLVM backend for running rust on GPUs, https://llvm.org/docs/NVPTXUsage.html labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-linker_messages Lint: linker_messages O-NVPTX Target: the NVPTX LLVM backend for running rust on GPUs, https://llvm.org/docs/NVPTXUsage.html S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants