]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
config: Use compiler from conf struct
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 14 Jul 2011 19:46:58 +0000 (21:46 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 17 Jul 2011 09:57:51 +0000 (11:57 +0200)
ccache.c

index 9b44fcac9b16d4dfab7c0796b8b0696a1c732d69..bdd6a8784df8823b3ba99dcb6433c680918a4bcc 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1218,7 +1218,6 @@ static void
 find_compiler(int argc, char **argv)
 {
        char *base;
-       char *path;
        char *compiler;
 
        orig_args = args_init(argc, argv);
@@ -1237,8 +1236,8 @@ find_compiler(int argc, char **argv)
        }
 
        /* support user override of the compiler */
-       if ((path = getenv("CCACHE_CC"))) {
-               base = x_strdup(path);
+       if (!str_eq(conf->compiler, "")) {
+               base = conf->compiler;
        }
 
        compiler = find_executable(base, MYNAME);