// Whether to strip color codes from diagnostic messages on output.
bool strip_diagnostics_colors = false;
+ // Have we seen --?
+ bool seen_double_dash = false;
+
// Have we seen -gsplit-dwarf?
bool seen_split_dwarf = false;
return Statistic::none;
}
+ if (args[i] == "--") {
+ args_info.seen_double_dash = true;
+ return Statistic::none;
+ }
+
// Other options.
if (args[i][0] == '-') {
if (compopt_affects_cpp_output(args[i])
args.push_back(ctx.args_info.output_dia);
}
+ if (ctx.args_info.seen_double_dash) {
+ args.push_back("--");
+ }
+
if (ctx.config.run_second_cpp()) {
args.push_back(ctx.args_info.input_file);
} else {
expect_stat preprocessed_cache_hit 1
expect_stat cache_miss 1
+ # -------------------------------------------------------------------------
+ if touch empty.c && $COMPILER -c -- empty.c 2>/dev/null; then
+ TEST "--"
+
+ $CCACHE_COMPILE -c -- test1.c
+ expect_stat preprocessed_cache_hit 0
+ expect_stat cache_miss 1
+
+ $CCACHE_COMPILE -c -- test1.c
+ expect_stat preprocessed_cache_hit 1
+ expect_stat cache_miss 1
+ fi
+
# -------------------------------------------------------------------------
TEST "Handling of compiler-only arguments"