> Scan all source files within the project to 1) identify defined modules, 2) identify which modules each source file imports, and 3) construct a DAG of module dependencies to be used to execute a build plan that ensures that, for each module M, a BMI is built for the module interface unit source file(s) that define M before any source file that imports M is compiled. See clang-scan-deps.
Hi all, I'm the author of the xmake build tool, I have verified this solution in xmake. It usually works fine.
But if there are a lot of module definition files in the project, this will affect the time of first compilation, because additional dependency analysis time is required.