From: Wilson Snyder Date: Thu, 10 Jun 2010 19:21:55 +0000 (-0400) Subject: set logfile so -c messages show up X-Git-Tag: v3.0~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdf1b54d158917890d504a9d1af1dc9cb323f86f;p=thirdparty%2Fccache.git set logfile so -c messages show up --- diff --git a/ccache.c b/ccache.c index fa54bdf40..5ba2105c5 100644 --- a/ccache.c +++ b/ccache.c @@ -1818,8 +1818,6 @@ static void ccache(int argc, char *argv[]) /* Arguments to send to the real compiler. */ ARGS *compiler_args; - cc_log("=== CCACHE STARTED ========================================="); - sloppiness = parse_sloppiness(getenv("CCACHE_SLOPPINESS")); cc_log("Hostname: %s", get_hostname()); @@ -2100,6 +2098,10 @@ int main(int argc, char *argv[]) char *p; char *program_name; + /* check for logging early so cc_log messages start working ASAP */ + cache_logfile = getenv("CCACHE_LOGFILE"); + cc_log("=== CCACHE STARTED ========================================="); + /* the user might have set CCACHE_UMASK */ p = getenv("CCACHE_UMASK"); if (p) { @@ -2142,8 +2144,6 @@ int main(int argc, char *argv[]) x_asprintf(&temp_dir, "%s/tmp", cache_dir); } - cache_logfile = getenv("CCACHE_LOGFILE"); - base_dir = getenv("CCACHE_BASEDIR"); if (base_dir && base_dir[0] != '/') { cc_log("Ignoring non-absolute base directory %s", base_dir);