]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
config: Use hard_link from conf struct
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 16 Jul 2011 15:31:53 +0000 (17:31 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 20 Jul 2011 21:31:36 +0000 (23:31 +0200)
ccache.c

index 307d307d005ea314b5845c1308d8e0de65a19476..f6bf79b2084cd6412fdf558b6ddf405dd278f28c 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1063,7 +1063,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
        } else {
                x_unlink(output_obj);
                /* only make a hardlink if the cache file is uncompressed */
-               if (getenv("CCACHE_HARDLINK") && !file_is_compressed(cached_obj)) {
+               if (conf->hard_link && !file_is_compressed(cached_obj)) {
                        ret = link(cached_obj, output_obj);
                } else {
                        ret = copy_file(cached_obj, output_obj, 0);
@@ -1093,7 +1093,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
        if (produce_dep_file) {
                x_unlink(output_dep);
                /* only make a hardlink if the cache file is uncompressed */
-               if (getenv("CCACHE_HARDLINK") && !file_is_compressed(cached_dep)) {
+               if (conf->hard_link && !file_is_compressed(cached_dep)) {
                        ret = link(cached_dep, output_dep);
                } else {
                        ret = copy_file(cached_dep, output_dep, 0);