Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2204,13 +2204,13 @@ impl Build {
// No explicit CC wrapper was detected, but check if RUSTC_WRAPPER
// is defined and is a build accelerator that is compatible with
// C/C++ compilers (e.g. sccache)
let valid_wrappers = ["sccache"];
const VALID_WRAPPERS: &[&'static str] = &["sccache", "cachepot"];

let rustc_wrapper = std::env::var_os("RUSTC_WRAPPER")?;
let wrapper_path = Path::new(&rustc_wrapper);
let wrapper_stem = wrapper_path.file_stem()?;

if valid_wrappers.contains(&wrapper_stem.to_str()?) {
if VALID_WRAPPERS.contains(&wrapper_stem.to_str()?) {
Some(rustc_wrapper.to_str()?.to_owned())
} else {
None
Expand Down