From c0e6bf17116c25e7c3602da084cdae7d9005c9d7 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 21 Nov 2010 11:36:13 +0100 Subject: [PATCH] Put -E compiler option check in the compopts table --- ccache.c | 10 +--------- compopt.c | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ccache.c b/ccache.c index ee6c5ff73..4932e6131 100644 --- a/ccache.c +++ b/ccache.c @@ -1237,15 +1237,7 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args, continue; } - /* some options will never work ... */ - if (str_eq(argv[i], "-E")) { - cc_log("Compiler option -E is unsupported"); - stats_update(STATS_UNSUPPORTED); - result = false; - goto out; - } - - /* these are too hard */ + /* These are always too hard. */ if (compopt_too_hard(argv[i]) || str_startswith(argv[i], "@")) { cc_log("Compiler option %s is unsupported", argv[i]); stats_update(STATS_UNSUPPORTED); diff --git a/compopt.c b/compopt.c index 48cbb77ae..d65e7e084 100644 --- a/compopt.c +++ b/compopt.c @@ -36,6 +36,7 @@ static const struct compopt compopts[] = { {"--param", TAKES_ARG}, {"-A", TAKES_ARG}, {"-D", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG}, + {"-E", TOO_HARD}, {"-G", TAKES_ARG}, {"-I", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG | TAKES_PATH}, {"-L", TAKES_ARG}, -- 2.47.2