From 7858d385855957ebfa6cfe329d8b8cbd9916f9b4 Mon Sep 17 00:00:00 2001 From: hodrob84 <36705238+hodrob84@users.noreply.github.com> Date: Sun, 11 Aug 2024 02:47:44 +0200 Subject: [PATCH] Add custom CC wrapper to the wrapper whitelist (#1175) --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index dedaeb61..67dc5de3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3119,7 +3119,11 @@ impl Build { // // It's true that everything here is a bit of a pain, but apparently if // you're not literally make or bash then you get a lot of bug reports. - let known_wrappers = ["ccache", "distcc", "sccache", "icecc", "cachepot"]; + let mut known_wrappers = vec!["ccache", "distcc", "sccache", "icecc", "cachepot"]; + let custom_wrapper = self.getenv("CC_KNOWN_WRAPPER_CUSTOM"); + if custom_wrapper.is_some() { + known_wrappers.push(custom_wrapper.as_deref().unwrap().to_str().unwrap()); + } let mut parts = tool.split_whitespace(); let maybe_wrapper = match parts.next() {