File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,21 @@ DEPENDENCY_TARGET_SED_PATTERN := \
215215# The fix-deps-file macro is used to adjust the contents of the generated make
216216# dependency files to contain paths compatible with make.
217217#
218+ REWRITE_PATHS_RELATIVE = false
218219ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
220+ REWRITE_PATHS_RELATIVE = true
221+ endif
222+
223+ # CCACHE_BASEDIR needs fix-deps-file as makefiles use absolute filenames for
224+ # object files while CCACHE_BASEDIR will make ccache relativize all paths for
225+ # its compiler. The compiler then produces relative dependency files.
226+ # make does not know a relative and absolute filename is the same so it will
227+ # ignore such dependencies.
228+ ifneq ($(CCACHE), )
229+ REWRITE_PATHS_RELATIVE = true
230+ endif
231+
232+ ifeq ($(REWRITE_PATHS_RELATIVE), true)
219233 # Need to handle -I flags as both '-Ifoo' and '-I foo'.
220234 MakeCommandRelative = \
221235 $(CD) $(WORKSPACE_ROOT) && \
You can’t perform that action at this time.
0 commit comments