Skip to content

Add support for sysroot --extern flag #96061

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

Closed
wants to merge 1 commit into from

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented Apr 14, 2022

This adds sysroot to the set of extern flags:
--extern sysroot:core=/path/to/core/libcore.rlib.

The primary effect of this flag is to suppress unused-crate-dependencies
warnings relating to the crate.

It's used for build environments where it's desirable for the build
system to explicitly specify dependencies on sysroot crates rather than
letting rustc find them implicitly. In such cases, these dependencies
are likely to be added unconditionally, so there's no way that a user
could act on an unused dependency warning.

Alternatively, I'd be fine with making this flag more explicitly about
suppressing the warning - e.g. nounused.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 14, 2022
@rust-highfive
Copy link
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 14, 2022
This adds `sysroot` to the set of extern flags:
`--extern sysroot:core=/path/to/core/libcore.rlib`.

The primary effect of this flag is to suppress `unused-crate-dependencies`
warnings relating to the crate.

It's used for build environments where it's desirable for the build
system to explicitly specify dependencies on sysroot crates rather than
letting rustc find them implicitly. In such cases, these dependencies
are likely to be added unconditionally, so there's no way that a user
could act on an unused dependency warning.
@jsgf
Copy link
Contributor Author

jsgf commented Apr 15, 2022

I'm going to go with nounused - new PR incoming.

#96067

@jsgf jsgf closed this Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants