-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add builtin:$path
option to the -L
flag
#659
Labels
major-change
A proposal to make a major change to rustc
major-change-accepted
A major change proposal that was accepted
T-compiler
Add this label so rfcbot knows to poll the compiler team
Comments
pietroalbini
added
T-compiler
Add this label so rfcbot knows to poll the compiler team
major-change
A proposal to make a major change to rustc
labels
Jul 31, 2023
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed. cc @rust-lang/compiler @rust-lang/compiler-contributors |
@rustbot second |
rustbot
added
the
final-comment-period
The FCP has started, most (if not all) team members are in agreement
label
Aug 28, 2023
Closing as accepted |
WaffleLapkin
added
major-change-accepted
A major change proposal that was accepted
and removed
final-comment-period
The FCP has started, most (if not all) team members are in agreement
labels
Sep 19, 2023
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Mar 26, 2024
…nkov Implement `-L KIND=@RUSTC_BUILTIN/...` Implements rust-lang/compiler-team#659
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Mar 27, 2024
…nkov Implement `-L KIND=@RUSTC_BUILTIN/...` Implements rust-lang/compiler-team#659
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 27, 2024
Rollup merge of rust-lang#121843 - ferrocene:builtin-path, r=petrochenkov Implement `-L KIND=@RUSTC_BUILTIN/...` Implements rust-lang/compiler-team#659
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
major-change
A proposal to make a major change to rustc
major-change-accepted
A major change proposal that was accepted
T-compiler
Add this label so rfcbot knows to poll the compiler team
Proposal
Ferrocene is going to ship some prebuilt libraries as part of its offering, and we need a way to make them available when invoking
rustc
. For most of those libraries, the easy solution will be to add the.rlib
files (compiled as part of./x
) to the sysroot, so that--extern foo
orextern crate foo;
work as expected.For some libraries though we need to ship multiple variants of it. The library that is prompting this is fairly hard to build and its source code is not public, but let's take
reqwest
as an example. You might want to shipreqwest
prebuilt both with thenative-tls
feature and with therustls-tls
feature, so that users of your distribution can choose which prebuilt version to use. You cannot put both of them into the sysroot, as you'd encounter conflicts.This MCP proposes a new variant for the
-L
flag:builtin:$path
. The flag means$path
is located inside of the distribution of rustc you are using. This would allow you to pass-L builtin:reqwest-native-tls
or-L builtin:reqwest-rustls
, without having to worry where in the distribution files the.rlib
s are located.In practice,
builtin:$path
will addlib/rustlib/$target/lib/builtin/$path
inside of the sysroot to the search path, but this is an internal implementation detail that can change at any time (for example if the sysroot structure changes).No builtin set of libraries is proposed to be shipped by the Rust project: this flag is meant to standardize how downstream distributions can provide such a feature.
The flag will be compatible with the kind of search path:
-L all=builtin:foo
or-L crate=builtin:bar
will be supported.Mentors or Reviewers
If you have a reviewer or mentor in mind for this work, mention them
here. You can put your own name here if you are planning to mentor the
work.
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
The text was updated successfully, but these errors were encountered: