From: Raphael Isemann Date: Tue, 8 Dec 2020 19:40:59 +0000 (+0100) Subject: [cmake] Make ExecutionEngine/Orc/Shared depend on intrinsics_gen to fix modules build X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a2c157eb3ebc5ed7e8037f7942991bd344a882cc;p=android-x86%2Fexternal-llvm-project.git [cmake] Make ExecutionEngine/Orc/Shared depend on intrinsics_gen to fix modules build The LLVM_ENABLE_MODULES builds currently randomly fail due depending on the headers generated by the intrinsics_gen target, but the current dependency only model the non-modules dependencies: ``` While building module 'LLVM_ExecutionEngine' imported from llvm-project/llvm/lib/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.cpp:13: While building module 'LLVM_intrinsic_gen' imported from llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:17: In file included from :1: In file included from llvm-project/llvm/include/llvm/IR/Argument.h:18: llvm/include/llvm/IR/Attributes.h:75:14: fatal error: 'llvm/IR/Attributes.inc' file not found #include "llvm/IR/Attributes.inc" ^~~~~~~~~~~~~~~~~~~~~~~~ ``` Depending on whether intrinsics_gen runs before compiling Orc/Shared files we either fail or include an outdated Attributes.inc in module builds. The Clang modules require these additional dependencies as including/importing one module requires all includes headers by that module to be parsable. Differential Revision: https://reviews.llvm.org/D92873 --- diff --git a/llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt index 808408c0e5d..62da0c71fb3 100644 --- a/llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt @@ -5,6 +5,9 @@ add_llvm_component_library(LLVMOrcShared ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc + DEPENDS + intrinsics_gen + LINK_COMPONENTS Support )