Skip to content

Commit 7858d38

Browse files
authored
Add custom CC wrapper to the wrapper whitelist (#1175)
1 parent 5863b31 commit 7858d38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3119,7 +3119,11 @@ impl Build {
31193119
//
31203120
// It's true that everything here is a bit of a pain, but apparently if
31213121
// you're not literally make or bash then you get a lot of bug reports.
3122-
let known_wrappers = ["ccache", "distcc", "sccache", "icecc", "cachepot"];
3122+
let mut known_wrappers = vec!["ccache", "distcc", "sccache", "icecc", "cachepot"];
3123+
let custom_wrapper = self.getenv("CC_KNOWN_WRAPPER_CUSTOM");
3124+
if custom_wrapper.is_some() {
3125+
known_wrappers.push(custom_wrapper.as_deref().unwrap().to_str().unwrap());
3126+
}
31233127

31243128
let mut parts = tool.split_whitespace();
31253129
let maybe_wrapper = match parts.next() {

0 commit comments

Comments
 (0)