Skip to content

Commit a11e066

Browse files
authored
allow cachepot als alternative to sccache (#599)
* chore: enable cachepot as an alternative to sccache * refactor: make valid_wrappers const
1 parent f0d5c2a commit a11e066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,13 +2210,13 @@ impl Build {
22102210
// No explicit CC wrapper was detected, but check if RUSTC_WRAPPER
22112211
// is defined and is a build accelerator that is compatible with
22122212
// C/C++ compilers (e.g. sccache)
2213-
let valid_wrappers = ["sccache"];
2213+
const VALID_WRAPPERS: &[&'static str] = &["sccache", "cachepot"];
22142214

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

2219-
if valid_wrappers.contains(&wrapper_stem.to_str()?) {
2219+
if VALID_WRAPPERS.contains(&wrapper_stem.to_str()?) {
22202220
Some(rustc_wrapper.to_str()?.to_owned())
22212221
} else {
22222222
None

0 commit comments

Comments
 (0)