diff options
Diffstat (limited to 'src/argprocessing.cpp')
| -rw-r--r-- | src/argprocessing.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index f300e7bd..54507724 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -610,9 +610,13 @@ process_option_arg(const Context& ctx, if (config.is_compiler_group_msvc() && !config.is_compiler_group_clang() && util::starts_with(arg, "-Z")) { - state.last_seen_msvc_z_option = args[i]; - state.common_args.push_back(args[i]); - return Statistic::none; + // Exclude other options starting with /Z (/Zc), which are not debug flags + const char debug_mode = arg[2]; + if (debug_mode == 'i' || debug_mode == '7' || debug_mode == 'I') { + state.last_seen_msvc_z_option = args[i]; + state.common_args.push_back(args[i]); + return Statistic::none; + } } // These options require special handling, because they behave differently |
