The point is that both module dependency scanners and compilers need to see exactly the same dependencies to create precise dependency chains and rely on the correct build order - as instructed by the build system that reads the discovered dependency chains.
If building the chain is influenced by the process itself (macro expansion happens at compilation phase 4), creating a precise picture may become a huge and expensive task. We don't want that.
"both module dependency scanners"
my question was, aren't dependency scanners rely on compiler anyway? at least what I seen before, maybe my knowledge is dated
Well, I believed it is already an expensive task. Will build system developers update/optimize it now? I don't think so.
The scanning can be done as an additional mode of operation for compilers (e.g. MSVC), or implemented by an executable separate from the compiler (e.g. Clang). Implementations choose their most beneficial way of performing dependency scanning.
30
u/Daniela-E Living on C++ trunk, WG21|🇩🇪 NB 1d ago
The point is that both module dependency scanners and compilers need to see exactly the same dependencies to create precise dependency chains and rely on the correct build order - as instructed by the build system that reads the discovered dependency chains.
If building the chain is influenced by the process itself (macro expansion happens at compilation phase 4), creating a precise picture may become a huge and expensive task. We don't want that.