It seems these exports are needed.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The more interesting issue here is why having a submodule export itself causes a change in behavior.
Comment Actions
It turns out that Module::buildVisibleModulesCache just recursively calls Module::getExportedModules. So without the self-export, the submodule doesn't export anything and contributes no exports, but if it does export itself, then it contributes itself to the list of exports.
In this case, e.g. #include <x86intrin.h> will trigger module intel to be imported, and since that module imports wmmintrin.h (through immintrin.h), then the aforementioned situation triggers.
Comment Actions
It turns out that these are the exports needed, since the wmmintrin.h file includes the aes and pclmul headers.