| Unsupported compiler option |
A compiler option not supported by ccache was found.
+| Unsupported environment variable |
+An environment variable not supported by ccache was set.
+
| Unsupported source language |
A source language e.g. specified with `-x` was unsupported by ccache.
TRY(set_up_uncached_err());
+ if (ctx.config.is_compiler_group_msvc()) {
+ for (const auto& name : {"CL", "_CL_"}) {
+ if (getenv(name)) {
+ LOG("Unsupported environment variable: {}", name);
+ return Statistic::unsupported_environment_variable;
+ }
+ }
+ }
+
if (!ctx.config.run_second_cpp() && ctx.config.is_compiler_group_msvc()) {
LOG_RAW("Second preprocessor cannot be disabled");
ctx.config.set_run_second_cpp(true);
-// Copyright (C) 2021 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
secondary_storage_error = 39,
secondary_storage_timeout = 40,
recache = 41,
+ unsupported_environment_variable = 42,
END
};
-// Copyright (C) 2021 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
FIELD(unsupported_compiler_option,
"Unsupported compiler option",
FLAG_UNCACHEABLE),
+ FIELD(unsupported_environment_variable,
+ "Unsupported environment variable",
+ FLAG_UNCACHEABLE),
FIELD(unsupported_source_language,
"Unsupported source language",
FLAG_UNCACHEABLE),