[PATCH] D42507: Fix -fmodules build after rL323277

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 14:29:38 PST 2018


arichardson created this revision.
arichardson added reviewers: chapuni, bkramer.
Herald added a subscriber: llvm-commits.

Since https://reviews.llvm.org/rL323277 utils/TableGen/CodeGenSchedule.cpp pulls in "llvm/CodeGen/TargetOpcodes.h".
This currently attempts to build the whole llvm/CodeGen module which will try to add
LLVM/IR/Attributes.h. This headers #include "llvm/IR/Attributes.gen" which needs to be
built by tablegen so the build failed.

As a workaround I marked llvm/CodeGen/TargetOpcodes.h as a textual header. I am not sure if that is the correct solution but at least the build passes again for me.


Repository:
  rL LLVM

https://reviews.llvm.org/D42507

Files:
  include/llvm/module.modulemap


Index: include/llvm/module.modulemap
===================================================================
--- include/llvm/module.modulemap
+++ include/llvm/module.modulemap
@@ -29,6 +29,10 @@
     textual header "CodeGen/DIEValue.def"
     textual header "CodeGen/RuntimeLibcalls.def"
     textual header "CodeGen/TargetOpcodes.def"
+
+    // This is needed by tablegen which can't pull in all of the dependecies of
+    // llvm/CodeGen since some of those headers are generated by tablegen.
+    textual header "CodeGen/TargetOpcodes.h"
   }
 
   module Target {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42507.131354.patch
Type: text/x-patch
Size: 564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/3d77309c/attachment.bin>


More information about the llvm-commits mailing list