]> git.proxmox.com Git - cargo.git/commit
Auto merge of #9566 - ehuss:relative-rustc-path, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 10 Jun 2021 14:15:18 +0000 (14:15 +0000)
committerbors <bors@rust-lang.org>
Thu, 10 Jun 2021 14:15:18 +0000 (14:15 +0000)
commit40b674cd1115299034fafa34e7db3a9140b48a49
tree6942d3ee96781646a95ca35e3d738efdc1583d85
parentb3475e6df9f9d0b3e61c84a5746f7dc872368637
parent47a02919cc454ab1653cd2054653befd705a9899
Auto merge of #9566 - ehuss:relative-rustc-path, r=alexcrichton

Fix rustc/rustdoc config values to be config-relative.

The `rustc`, `rustdoc`, `rustc_wrapper`, and `rustc_workspace_wrapper` config values (in the `[build]` table) were being interpreted literally. This caused a problem if you used a relative path like `foo/rustc`.  This would be interpreted as a relative path from whatever cwd cargo launches rustc from, which changes for different scenarios, making it essentially unusuable (since crates.io dependencies wouldn't be buildable).

Additionally, due to https://github.com/rust-lang/rust/issues/37868, it is a bad idea to use relative paths.

This changes it so that those paths are config-relative.  Bare names (like "my-rustc-program") still use PATH as before.

This also includes a commit to centralize the rustc-wrapper program used by several tests so that it isn't built multiple times (and to allow several tests to work on windows).

Fixes #8202
tests/testsuite/fix.rs