See gdr’s P3041R0. This offers a way to tell the build system that a header is implemented by importing a module and giving sidecar macros through some -include-like mechanism that injects macros at the import of the relevant header. But it works through importing headers, not named modules. This I can support building (because scanning has support for finding the macros).
Given that [[clang::import_macro]] is just asking for:
#ifdef from_A
import B;
#endif
which is unbuildable in general, I’m hesitant to support such a thing.
I doubt the “technically we can solve it” without dropping support for static build graph tools (namely ninja). I cannot write a build.ninja file that can do this because I need to scan before I can scan to make sure that A’s BMI is available before I scan a.cc. If B then also has macros that may make C available, I need to schedule a second wait for the final scan. Ninja does not support such dynamic node generation and upstream refuses to do so (for reasonable reasons given its goals).