[PATCH] D69817: Fix OrcError build with modules enabled.

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 12:31:49 PST 2019


vsapsai created this revision.
vsapsai added reviewers: beanz, lhames.
Herald added subscribers: ributzka, dexonsmith, jkorous, hiraditya, mehdi_amini, mgorny.
Herald added a project: LLVM.

Bot http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/ fails
with an error

> error: 'llvm/IR/Attributes.inc' file not found

while building OrcError. It happens because OrcError.cpp depends on
'LLVM_ExecutionEngine' module through including
"llvm/ExecutionEngine/Orc/OrcError.h". And `LLVM_ExecutionEngine'
depends on 'LLVM_intrinsic_gen' through ExecutionEngine.h including
"llvm/IR/Module.h". But we fail to build 'LLVM_intrinsic_gen' because
'llvm/IR/Attributes.inc' is missing. Note that this problem doesn't
happen in a non-modular build because OrcError files don't try to
include .inc files transitively.

Fix by making the target LLVMOrcError depend on intrinsics_gen the same
way LLVMOrcJIT does.

rdar://problem/56377508


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69817

Files:
  llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt


Index: llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
===================================================================
--- llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
+++ llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
@@ -3,4 +3,7 @@
   RPCError.cpp
   ADDITIONAL_HEADER_DIRS
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc
+
+  DEPENDS
+  intrinsics_gen
   )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69817.227760.patch
Type: text/x-patch
Size: 377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191104/ac39dec6/attachment.bin>


More information about the llvm-commits mailing list