Auto merge of #5228 - phil-opp:target-spec, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 26 Mar 2018 13:00:26 +0000 (13:00 +0000)
committerbors <bors@rust-lang.org>
Mon, 26 Mar 2018 13:00:26 +0000 (13:00 +0000)
Add support for absolute target.json paths

Builds upon https://github.com/rust-lang/rust/pull/49019 with the goal to provide a solution to https://github.com/rust-lang/cargo/issues/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 https://github.com/rust-lang/rust/pull/49019. This helps differentiating targets with the same JSON file name and avoids sysroot clashes in `xargo`.~~ See https://github.com/rust-lang/cargo/pull/5228#discussion_r176827531
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.

1  2 
tests/testsuite/main.rs

Simple merge