From: Joel Rosdahl Date: Mon, 17 Jan 2022 17:46:45 +0000 (+0100) Subject: refactor: Simplify -fsyntax-only logic X-Git-Tag: v4.6~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ace5fcce31aab038acf650f88b1b5ffee4935b59;p=thirdparty%2Fccache.git refactor: Simplify -fsyntax-only logic --- diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index 1067e6659..a5b3a49af 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2021 Joel Rosdahl and other contributors +// Copyright (C) 2020-2022 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -1210,11 +1210,11 @@ process_args(Context& ctx) return Statistic::could_not_use_precompiled_header; } - if (!state.found_c_opt && !state.found_dc_opt && !state.found_S_opt) { + // -fsyntax-only/-Zs does not need -c + if (!state.found_c_opt && !state.found_dc_opt && !state.found_S_opt + && !state.found_syntax_only) { if (args_info.output_is_precompiled_header) { state.common_args.push_back("-c"); - } else if (state.found_syntax_only) { - // -fsyntax-only/-Zs does not need -c } else { LOG_RAW("No -c option found"); // Having a separate statistic for autoconf tests is useful, as they are