https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93038
Bug ID: 93038 Summary: Missing dependencies in depfile for imported files at compilation time Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: bouvier.pierrick at yahoo dot fr Target Milestone: --- Dear GDC developers, when gdc is used to generate a depfile (make format), if code uses feature import(file), file is not reported in list of dependencies. I tested with gdc-{8,9,10}. # cat main.d import std.stdio; void main() { writeln(import(".bashrc")); } # gdc main.d -J. -MMD # cat main.deps main.o: main.d Until version 8, gdc has support for fdeps option. Problem is that format used (dictated by dmd) is useless in Make/Ninja build systems. # gdc-8 -fdeps main.d -J. ... depsFile main (main.d) : .bashrc (/home/user/.bashrc) ... I build my code using meson project, which relies on depfiles created by compiler. Thus, a dependency is missed. Would that be possible to add file imported at compilation time in list of dependencies? Technically, I think this file is not read at same time than other import, but I still think that would be a great add to gdc. Thank you, Pierrick