Uh oh!
There was an error while loading. Please reload this page.
Introduce a TargetTriple enum to support absolute target paths - #49019
Conversation
rust-highfive
commented
Mar 14, 2018
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
oli-obk
commented
Mar 15, 2018
Travis failure is legit |
phil-opp
commented
Mar 15, 2018
Thanks for the hint, I pushed a new version. |
pnkfelix
commented
Mar 19, 2018
@bors r+ |
bors
commented
Mar 19, 2018
📌 Commit 4b16597 has been approved by |
phil-opp
commented
Mar 22, 2018
@pnkfelix I added a commit that appends a hash of the target path when a |
phil-opp
commented
Mar 22, 2018
Rebased and fixed some target triple uses introduced by other PRs. |
bors
commented
Mar 23, 2018
☔ The latest upstream changes (presumably #49308) made this pull request unmergeable. Please resolve the merge conflicts. |
phil-opp
commented
Mar 24, 2018
Rebased |
Add support for absolute target.json paths Builds upon rust-lang/rust#49019 with the goal to provide a solution to #4905. This PR does two things: ~~1. It appends a hash of the target path to the target folder name if a `*.json` path is passed as `--target`, like it's done in rust-lang/rust#49019. This helps differentiating targets with the same JSON file name and avoids sysroot clashes in `xargo`.~~ See #5228 (comment) 2. It canonicalizes the passed target path (if it's a `*.json` path), so that the path stays valid when building dependencies and setting the `RUST_TARGET_PATH` environment variable is no longer necessary.
pnkfelix
commented
Mar 28, 2018
@bors r+ |
bors
commented
Mar 28, 2018
📌 Commit b889f98 has been approved by |
bors
commented
Mar 28, 2018
Introduce a TargetTriple enum to support absolute target paths This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used. The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension). For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
bors
commented
Mar 28, 2018
☀️ Test successful - status-appveyor, status-travis |
This PR replaces target triple strings with a
TargetTripleenum, which represents either a target triple or a path to a JSON target file. The path variant is used if the--targetargument has a.jsonextension, else the target triple variant is used.The motivation of this PR is support for absolute target paths to avoid the need for setting the
RUST_TARGET_PATHenvironment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension).For compatibility, we keep the old behavior of searching for a file named
$(target_triple).jsoninRUST_TARGET_PATHfor non-official target triples.