Skip to content

Regression: localized MSVC linker progress messages are emitted as linker stdout warnings #159133

Description

@gifnksm

Code

I tried this code:

Cargo.toml

[package]
name = "foo"
version = "0.1.0"
edition = "2024"

[lib]
crate-type = ["cdylib"]

src/lib.rs (empty)

Build with:

cargo build

I expected to see this happen:

The build should complete without any warnings.

Instead, this happened:

warning: linker stdout: ライブラリ C:\Users\...\foo.dll.lib とオブジェクト C:\Users\...\foo.dll.exp を作成中
  |
  = note: `#[warn(linker_messages)]` on by default

The warning is emitted on every build.

According to the Rust 1.97 release notes, common linker messages that have been diagnosed as false positives or intentional behavior are filtered out by rustc.

The linker message:

ライブラリ ... とオブジェクト ... を作成中

translates to:

Creating library ... and object ...

This appears to be the localized equivalent of one of those common linker messages.

Version it worked on

It most recently worked on: 1.96.0

Version with regression

rustc --version --verbose:

rustc 1.97.0 (2d8144b78 2026-07-07)
binary: rustc
commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3
commit-date: 2026-07-07
host: x86_64-pc-windows-msvc
release: 1.97.0
LLVM version: 22.1.6

rustc +nightly --version --verbose:

rustc 1.99.0-nightly (375b1431b 2026-07-10)
binary: rustc
commit-hash: 375b1431b7d89d1c2e2bc168c011848ae12b7d14
commit-date: 2026-07-10
host: x86_64-pc-windows-msvc
release: 1.99.0-nightly
LLVM version: 22.1.8

Backtrace

N/A (no crash)

Additional information

Environment:

  • Windows 11 (display language: Japanese)
  • Target: x86_64-pc-windows-msvc
  • Visual Studio Build Tools 2022
  • link.exe version 14.44.35228.0

The issue reproduces consistently with the minimal example above.

The linker is localized. For example, invoking link.exe without arguments displays Japanese help text.

Looking at compiler/rustc_codegen_ssa/src/back/link.rs, the linker message filter appears to recognize English messages such as "Creating library", but not the localized equivalent.

@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-linkersArea: linkers... you gotta love linkersC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions