[llvm] 7424705 - Fix modules build after https://reviews.llvm.org/D73835 (IRBuilder virtualization change)

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 11:22:54 PST 2020


Author: Vedant Kumar
Date: 2020-02-17T11:22:44-08:00
New Revision: 7424705157ba051d8e2f21815f5e051c4d786b94

URL: https://github.com/llvm/llvm-project/commit/7424705157ba051d8e2f21815f5e051c4d786b94
DIFF: https://github.com/llvm/llvm-project/commit/7424705157ba051d8e2f21815f5e051c4d786b94.diff

LOG: Fix modules build after https://reviews.llvm.org/D73835 (IRBuilder virtualization change)

I readily admit that I don't know why this fixes the modules build, but
it seems to get things building again. Previously I saw the error
message:

http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/9404/consoleFull#-361314398a1ca8a51-895e-46c6-af87-ce24fa4cd561

```
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/IR/IRBuilderFolder.h:18:10: fatal error: cyclic dependency in module 'LLVM_intrinsic_gen': LLVM_intrinsic_gen -> LLVM_IR -> LLVM_intrinsic_gen

         ^
While building module 'LLVM_intrinsic_gen' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/IR/IRBuilder.cpp:14:
In file included from <module-includes>:1:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/IR/Argument.h:19:10: fatal error: could not build module 'LLVM_IR'
 ~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/IR/IRBuilder.cpp:14:10: fatal error: could not build module 'LLVM_intrinsic_gen'
```

And reproduced with:

cmake -G Ninja /Users/vsk/src/llvm-backup-master/llvm -DCLANG_ENABLE_ARCMT=Off -DCLANG_ENABLE_STATIC_ANALYZER=Off -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;lld;libcxx;libcxxabi;compiler-rt;libunwind;lldb' -DLLDB_USE_SYSTEM_DEBUGSERVER=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_MODULES=On

Added: 
    

Modified: 
    llvm/include/llvm/module.modulemap

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/module.modulemap b/llvm/include/llvm/module.modulemap
index 1e6c570beddb..d220cc0ab0be 100644
--- a/llvm/include/llvm/module.modulemap
+++ b/llvm/include/llvm/module.modulemap
@@ -234,6 +234,7 @@ module LLVM_intrinsic_gen {
   module IR_ConstantFolder { header "IR/ConstantFolder.h" export * }
   module IR_GlobalVariable { header "IR/GlobalVariable.h" export * }
   module IR_NoFolder { header "IR/NoFolder.h" export * }
+  module IRBuilderFolder { header "IR/IRBuilderFolder.h" export * }
   module IR_Module { header "IR/Module.h" export * }
   module IR_ModuleSummaryIndex { header "IR/ModuleSummaryIndex.h" export * }
   module IR_ModuleSummaryIndexYAML { header "IR/ModuleSummaryIndexYAML.h" export * }


        


More information about the llvm-commits mailing list