]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Check CCACHE_DISABLED early
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 19 Jun 2010 19:23:52 +0000 (21:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 19 Jun 2010 19:32:07 +0000 (21:32 +0200)
ccache.c

index 0638687fdc73d304fffa422c474d3ea023ba09ad..58bfdd5c31a2639fae20778927924ac033fa70b4 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1849,6 +1849,13 @@ static void ccache(int argc, char *argv[])
        /* Arguments to send to the real compiler. */
        ARGS *compiler_args;
 
+       find_compiler(argc, argv);
+
+       if (getenv("CCACHE_DISABLE")) {
+               cc_log("ccache is disabled");
+               failed();
+       }
+
        sloppiness = parse_sloppiness(getenv("CCACHE_SLOPPINESS"));
 
        cc_log("Hostname: %s", get_hostname());
@@ -1858,13 +1865,6 @@ static void ccache(int argc, char *argv[])
                cc_log("Base directory: %s", base_dir);
        }
 
-       find_compiler(argc, argv);
-
-       if (getenv("CCACHE_DISABLE")) {
-               cc_log("ccache is disabled");
-               failed();
-       }
-
        if (getenv("CCACHE_UNIFY")) {
                cc_log("Unify mode disabled");
                enable_unify = 1;