From 71cfd423e3eb495676c9cd47151089e6dd4b9570 Mon Sep 17 00:00:00 2001 From: Jasmine Tang Date: Sun, 17 May 2026 18:43:35 -0700 Subject: [PATCH] Add -fno-cxx-modules to clang's known -Xclang flags Downstream Bazel's C++ toolchain passes `-Xclang -fno-cxx-modules` in its compiler sanity checks. Since -fno-cxx-modules wasn't in sccache's known flag list, the xclang argument parser in gcc.rs treated it as an UnknownFlag and bailed with CannotCache. --- src/compiler/clang.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/clang.rs b/src/compiler/clang.rs index e6294d524..399e72424 100644 --- a/src/compiler/clang.rs +++ b/src/compiler/clang.rs @@ -212,6 +212,7 @@ counted_array!(pub static ARGS: [ArgInfo; _] = [ take_arg!("-fmodule-output", OsString, Concatenated, ClangModuleOutput), flag!("-fmodules-reduced-bmi", PassThroughFlag), flag!("-fno-color-diagnostics", NoDiagnosticsColorFlag), + flag!("-fno-cxx-modules", PassThroughFlag), flag!("-fno-pch-timestamp", PassThroughFlag), flag!("-fno-profile-instr-generate", TooHardFlag), flag!("-fno-profile-instr-use", TooHardFlag),