From: Orgad Shaneh Date: Mon, 24 Jan 2022 17:07:20 +0000 (+0200) Subject: fix: Do not handle -o for MSVC (#994) X-Git-Tag: v4.6~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b02c0012f1cd80a03f055b14e533af033a9eb7d5;p=thirdparty%2Fccache.git fix: Do not handle -o for MSVC (#994) Co-authored-by: Luboš Luňák --- diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index e8d8db8c4..b036d5a6a 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -514,8 +514,12 @@ process_arg(const Context& ctx, } // Alternate form of -o with no space. Nvcc does not support this. + // Cl does support it as deprecated, but also has -openmp or -link -out + // which can confuse this and cause incorrect output_obj (and thus + // ccache debug file location), so better ignore it. if (util::starts_with(args[i], "-o") - && config.compiler_type() != CompilerType::nvcc) { + && config.compiler_type() != CompilerType::nvcc + && config.compiler_type() != CompilerType::msvc) { args_info.output_obj = Util::make_relative_path(ctx, string_view(args[i]).substr(2)); return nullopt;