From e0318a9d9a1d177bd771bc094894f041e0cefc0a Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 16 Jul 2011 19:37:14 +0200 Subject: [PATCH] config: Use read_only from conf struct --- ccache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccache.c b/ccache.c index ce63eefb1..4dfe9f21d 100644 --- a/ccache.c +++ b/ccache.c @@ -1150,7 +1150,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) if (conf->direct_mode && put_object_in_manifest && included_files - && !getenv("CCACHE_READONLY")) { + && !conf->read_only) { struct stat st; size_t old_size = 0; /* in bytes */ if (stat(manifest_path, &st) == 0) { @@ -2055,7 +2055,7 @@ ccache(int argc, char *argv[]) /* if we can return from cache at this point then do */ from_cache(FROMCACHE_CPP_MODE, put_object_in_manifest); - if (getenv("CCACHE_READONLY")) { + if (conf->read_only) { cc_log("Read-only mode; running real compiler"); failed(); } -- 2.47.3