-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc will fallback to libraries distributed with the compiler in presence of --extern #26043
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
Comments
Triage: this still is true today. Reproduction note: you can get this log by doing |
Triage: no change |
This issue is about that rustc invalidly will consider its own libc as a candidate for That was accidentally fixed in
It is clear that
We can see both that the We need a regression test before we can close this. @rustbot label E-needs-test |
Add regression test for resolving `--extern libc=test.rlib` Closes rust-lang#26043 I could not find a test for this particular use case. The closest I got was [`tests/ui/imports/issue-37887.rs`](https://github.com/rust-lang/rust/blob/master/tests/ui/imports/issue-37887.rs), but that is a regression test for a different use case (see rust-lang#37887).
is the only file in a directory.
rustc
when invoked like this:will still resolve libc to its own liblibc copy rather than fail, as testified by these logs:
It should fail with a hard error instead, as if the copy shipped with rustc didn’t exist:
The text was updated successfully, but these errors were encountered: