From 20959c3cfd3b26fff124c8d59eb7e795b97f49a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 25 Aug 2018 19:56:21 +0200 Subject: [PATCH] Make depend paths relative earlier for depend mode --- src/ccache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ccache.c b/src/ccache.c index 8c9c317fb..0a1392408 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -1394,6 +1394,10 @@ to_cache(struct args *args, struct mdfour *depend_mode_hash) failed(); } + if (generating_dependencies) { + use_relative_paths_in_depfile(output_dep); + } + if (conf->depend_mode) { struct file_hash *object_hash = object_hash_from_depfile(output_dep, depend_mode_hash); if (!object_hash) @@ -1435,8 +1439,6 @@ to_cache(struct args *args, struct mdfour *depend_mode_hash) copy_file_to_cache(output_obj, cached_obj); if (generating_dependencies) { - // GJK: TODO: need to execute this earlier when in depend_mode - use_relative_paths_in_depfile(output_dep); copy_file_to_cache(output_dep, cached_dep); } if (generating_coverage) { -- 2.47.3