]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Put -E compiler option check in the compopts table
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Nov 2010 10:36:13 +0000 (11:36 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Nov 2010 10:36:13 +0000 (11:36 +0100)
ccache.c
compopt.c

index ee6c5ff7380a316fc635f6d66b889b45cd2ca1ab..4932e6131a3117d3d55fc0d13cd5e82a6c5553da 100644 (file)
--- 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);
index 48cbb77aecbf38927df954b5e2457739cadd7206..d65e7e084dee9d4a803b24be9a993fc099a562a0 100644 (file)
--- 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},