On 1/25/23 16:06, Ben Boeckel wrote:
They affect the build, so report them via `-MF` mechanisms.
Why isn't this covered by the existing code in preprocessed_module?
gcc/cp/ * module.cc (do_import): Report imported CMI files as dependencies. Signed-off-by: Ben Boeckel <ben.boec...@kitware.com> --- gcc/cp/module.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index ebd30f63d81..dbd1b721616 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -18966,6 +18966,8 @@ module_state::do_import (cpp_reader *reader, bool outermost) dump () && dump ("CMI is %s", file); if (note_module_cmi_yes || inform_cmi_p) inform (loc, "reading CMI %qs", file); + /* Add the CMI file to the dependency tracking. */ + deps_add_dep (cpp_get_deps (reader), file); fd = open (file, O_RDONLY | O_CLOEXEC | O_BINARY); e = errno; }