Closes #1534.
return Statistic::none;
}
- if (arg == "-showIncludes") {
+ if (arg == "-showIncludes"
+ // clang-cl:
+ || arg == "-showIncludes:user") {
args_info.generating_includes = true;
state.dep_args.push_back(args[i]);
return Statistic::none;
// Is the compiler being asked to output dependencies?
bool generating_dependencies = false;
- // Is the compiler being asked to output includes (MSVC /showIncludes)?
+ // Is the compiler being asked to output includes (MSVC /showIncludes or
+ // clang-cl /showIncludes:user)?
bool generating_includes = false;
// The dependency target in the dependency file (the object file unless
util::Bytes stderr_data;
};
-// Extract the used includes from /showIncludes output in stdout. Note that we
-// cannot distinguish system headers from other includes here.
+// Extract the used includes from /showIncludes (or clang-cl's
+// /showIncludes:user) output in stdout. Note that we cannot distinguish system
+// headers from other includes when /showIncludes is used.
static tl::expected<Hash::Digest, Failure>
result_key_from_includes(Context& ctx, Hash& hash, std::string_view stdout_data)
{