[PATCH] D21892: Clang modules builds depend header-wise on it as they ship all headers from the umbrella folders.
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 09:23:02 PDT 2016
v.g.vassilev added a comment.
Thank you for the prompt review @beanz!
I agree with the comments. When compiling with modules, header A and B can be in the same module M. B depends on intrinsics_gen and A doesn't. When compiling a cpp file #include-ing header A, we implicitly request module M to be built. It puts header A and B in the same TU and tries to build them. Since B depends on intrinsics_gen (which might not be built yet) we run into issues such as: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/17214/steps/compile.llvm.stage2/logs/stdio
I am not sure how to fix this issue. I have tried to solve it on modulemap level but failed. And anyway it would have been fragile (if the contents of the headers change we are back to square one). In a private discussion with Richard Smith we agreed that would be the least evil way to address the issue. An option would be to make this patch conditional if modules are enabled, but I personally don't like this approach because it makes the modules and non-modules builds different.
Can you recommend another acceptable way to enforce intrinsics_gen to be built first?
http://reviews.llvm.org/D21892
More information about the llvm-commits
mailing list