-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add a default directory to RUST_TARGET_PATH #16351
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Would this change need an RFC? I'm inclined to say so, but I'm not sure. |
No, this is purely a rustc thing. Target specs can't ever be part of the language spec. |
Triage: not aware of a change here. |
What if it tried |
This was clarified in a recent PR, let me find it. |
This issue is mentioned in src/librustc_target/spec/mod.rs:1271 as being a FIXME. There still doesn't appear to be any sort of sane default search path. I like @kevinmehall 's approach, which tucks the Should this issue be reopened, since it was closed without any solution? |
Add default search path to `Target::search()` The function `Target::search()` accepts a target triple and returns a `Target` struct defining the requested target. There is a `// FIXME 16351: add a sane default search path?` comment that indicates it is desirable to include some sort of default. This was raised in rust-lang#16351 which was closed without any resolution. rust-lang#31117 was proposed, however that has platform-specific logic that is unsuitable for systems without `/etc/`. This patch implements the suggestion raised in rust-lang#16351 (comment) where a `target.json` file may be placed in `$(rustc --print sysroot)/lib/rustlib/<target-triple>/target.json`. This allows shipping a toolchain distribution as a single file that gets extracted to the sysroot.
Add default search path to `Target::search()` The function `Target::search()` accepts a target triple and returns a `Target` struct defining the requested target. There is a `// FIXME 16351: add a sane default search path?` comment that indicates it is desirable to include some sort of default. This was raised in rust-lang#16351 which was closed without any resolution. rust-lang#31117 was proposed, however that has platform-specific logic that is unsuitable for systems without `/etc/`. This patch implements the suggestion raised in rust-lang#16351 (comment) where a `target.json` file may be placed in `$(rustc --print sysroot)/lib/rustlib/<target-triple>/target.json`. This allows shipping a toolchain distribution as a single file that gets extracted to the sysroot.
internal: Eagerly lower enum variants in CrateDefMap construction
Add default search path to `Target::search()` The function `Target::search()` accepts a target triple and returns a `Target` struct defining the requested target. There is a `// FIXME 16351: add a sane default search path?` comment that indicates it is desirable to include some sort of default. This was raised in rust-lang/rust#16351 which was closed without any resolution. rust-lang/rust#31117 was proposed, however that has platform-specific logic that is unsuitable for systems without `/etc/`. This patch implements the suggestion raised in rust-lang/rust#16351 (comment) where a `target.json` file may be placed in `$(rustc --print sysroot)/lib/rustlib/<target-triple>/target.json`. This allows shipping a toolchain distribution as a single file that gets extracted to the sysroot.
It's possible that we want some sort of system-wide installation of target specifications.
The text was updated successfully, but these errors were encountered: