-
Notifications
You must be signed in to change notification settings - Fork 13.3k
run-pass/lib-defaults.rs warns of redundant linker flag #54222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
A-linkage
Area: linking into static, shared libraries and binaries
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
(the same output is issued for Mac OS X, which leads me to wonder if it is also issued on Windows? If that is the case, then I'd be inclined to add a |
I've confirmed that I've seen the warning issued on both Linux and OS X. |
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
Sep 21, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Triage: going to try remove this ignore, and see if anyone still reports observing this locally now. |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 6, 2025
Rollup merge of rust-lang#140681 - jieyouxu:test_helpers, r=petrochenkov Don't ignore compiler stderr in `lib-defaults.rs` Closes rust-lang#54222. - Don't ignore compiler stderr. - Document test intent. - Move under `tests/ui/link-native-libs/` instead. This was previously discussed on https://web.archive.org/web/20181028094402/https://botbot.me/mozilla/rust-tools/2017-02-21/?page=1. try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-linkage
Area: linking into static, shared libraries and binaries
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This test:
rust/src/test/run-pass/lib-defaults.rs
Lines 13 to 18 in fccde00
is causing the following compile-time output to stderr (on Linux; not sure about other hosts):
This is the command line that compiletest is constructing:
I haven't delved deeply into what our requirements are for linkage directives. I'm guessing that
rustc
is able to construct the desired-lrust_test_helpers
from the presence of the#[link(name = "rust_test_helpers", kind = "static")]
, but it might be good to know if that is the case on all of our platforms?(I.e. maybe we should strive to remove the
// compile-flags: -lrust_test_helpers
directive from this test, or if that fails, maybe it conditional on which platform we are testing on...)In any case I am mainly filling this ticket so I have something to link to in the test when I explain why I'm ignoring the stderr output from the compiler in this case.
The text was updated successfully, but these errors were encountered: