From aa9dc778a36be925074eb26218e87f8f8c13cd67 Mon Sep 17 00:00:00 2001 From: senhtry Date: Thu, 17 Jul 2025 22:01:51 +0800 Subject: [PATCH] fix: Fix bug in support for Clang to compile CUDA code on Windows --- src/ccache/ccache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ccache/ccache.cpp b/src/ccache/ccache.cpp index 30da9cae..65baf609 100644 --- a/src/ccache/ccache.cpp +++ b/src/ccache/ccache.cpp @@ -1379,7 +1379,8 @@ get_result_key_from_cpp(Context& ctx, Args& args, Hash& hash) // When Clang runs in verbose mode, it outputs command details to stdout, // which can corrupt the output of precompiled CUDA files. Therefore, caching // is disabled in this scenario. (Is there a better approach to handle this?) - const bool is_clang_cu = ctx.config.is_compiler_group_clang() + const bool is_clang_cu = (ctx.config.is_compiler_group_clang() + && !ctx.config.is_compiler_group_msvc()) && (ctx.args_info.actual_language == "cu" || ctx.args_info.actual_language == "cuda") && !get_clang_cu_enable_verbose_mode(args); -- 2.47.2