Skip to content

Commit 4d36cfa

Browse files
Use RUSTC_WRAPPER if no other wrapper is provided (#918)
* Use RUSTC_WRAPPER if no other wrapper is provided Previously, the `rustc_wrapper_fallback` was only called if the tool was **not** a full path. With this patch, the `RUSTC_WRAPPER` is always used, even if the tool provided is an exact path. Providing a wrapper manually is still possible and overrides the `RUSTC_WRAPPER`. If the path to the tool includes spaces it is otherwise impossible to provide a compiler cache like sccache through the CXX or CC environment variables, as the arguments will be split up incorrectly. See also: corrosion-rs/corrosion#474 * Add #[allow(dead_code)] to ArchSpec::Catalyst This should suppress new warnings generated by the nightly toolchain.
1 parent 8cf5455 commit 4d36cfa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,6 +2380,7 @@ impl Build {
23802380
enum ArchSpec {
23812381
Device(&'static str),
23822382
Simulator(&'static str),
2383+
#[allow(dead_code)]
23832384
Catalyst(&'static str),
23842385
}
23852386

@@ -2761,7 +2762,11 @@ impl Build {
27612762
// interpretation at all, just pass it on through. This'll hopefully get
27622763
// us to support spaces-in-paths.
27632764
if Path::new(&*tool).exists() {
2764-
return Some((PathBuf::from(&*tool), None, Vec::new()));
2765+
return Some((
2766+
PathBuf::from(&*tool),
2767+
Self::rustc_wrapper_fallback(),
2768+
Vec::new(),
2769+
));
27652770
}
27662771

27672772
// Ok now we want to handle a couple of scenarios. We'll assume from

0 commit comments

Comments
 (0)