Repository navigation
build(cargo): silence the Windows linker_messages warning - #551
Merged
Merged
Conversation
MSVC's link.exe prints its (localized) "Creating library <x>.lib and object
<x>.exp" line to stdout whenever it emits an import library, and rustc 1.97+
reports any linker stdout as a `linker_messages` warning. Every Windows link
of a bin or cdylib therefore warned: `make install` printed one for the
`future` CLI and one for the Tauri `futureos` lib, and `cargo test` did too.
`/NOLOGO` does not suppress that line, so allow the lint for the Windows
target instead of shipping benign linker noise.
Verified on Windows (rustc 1.97.0): `cargo build -p future-cli` is silent
with this config, while the same command with RUSTFLAGS set (which bypasses
config rustflags) still reproduces "warning: linker stdout: ..." for the
identical link that writes target/debug/deps/future.{lib,exp}.
huichen
enabled auto-merge (squash)
September 10, 2026 14:38
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.
Problem
make installon Windows warns on every link step:and again for the Tauri
futureoslib insidetauri build.cargo testshows it on Windows too.Cause
MSVC's
link.exeprints its (localized)Creating library <x>.lib and object <x>.expline to stdout whenever it creates an import library, and rustc 1.97+ reports any linker stdout as the warn-by-defaultlinker_messageslint. It is benign —/NOLOGOdoes not suppress that line (checked locally) — so the lint is the only knob.Change
Allow
linker_messagesin the existing[target.x86_64-pc-windows-msvc]rustflags of the repo-wide.cargo/config.toml, next to the existing/DEBUG:NONE. Cargo walks up from the CWD, so this also coversdesktop/src-tauriandchannels. Windows-only: Linux/macOS builds and CI are untouched.Verification (Windows, pinned rustc 1.97.0)
cargo build -p future-cli(debug, full workspace dep graph) finishes with 0 warnings, while the same link still writestarget/debug/deps/future.{lib,exp}— i.e. it did go through the import-library step that triggers the message.RUSTFLAGSset (which bypasses config rustflags): the warning is back for the identical link, so the silence comes from this config and not from a skipped link.cdylibcargo probe reproduced the warning without the rustflags and stayed silent with them.Note
rustflagsare part of Cargo's fingerprint, so Windows devs pay one full rebuild once this lands.