michele.scandale created this revision. michele.scandale added reviewers: chandlerc, beanz, zturner. Herald added subscribers: lldb-commits, cfe-commits, MaskRay, aheejin, arichardson, sbc100, mgorny, emaste. Herald added a reviewer: espindola. Herald added a reviewer: MaskRay. Herald added projects: clang, LLDB.
The `intrinsics_gen` target exists in the CMake exports since r309389 (see LLVMConfig.cmake.in), hence projects can depend on `intrinsics_gen` even it they are built separately from LLVM. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83454 Files: clang/CMakeLists.txt clang/lib/CodeGen/CMakeLists.txt clang/lib/Frontend/CMakeLists.txt clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt clang/tools/clang-import-test/CMakeLists.txt clang/tools/clang-offload-bundler/CMakeLists.txt clang/tools/clang-offload-wrapper/CMakeLists.txt clang/tools/driver/CMakeLists.txt lld/COFF/CMakeLists.txt lld/Common/CMakeLists.txt lld/ELF/CMakeLists.txt lld/MinGW/CMakeLists.txt lld/lib/Core/CMakeLists.txt lld/wasm/CMakeLists.txt lldb/CMakeLists.txt lldb/source/Expression/CMakeLists.txt lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt =================================================================== --- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt +++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt @@ -1,8 +1,3 @@ -if(NOT LLDB_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - - add_lldb_library(lldbPluginRenderScriptRuntime PLUGIN RenderScriptRuntime.cpp RenderScriptExpressionOpts.cpp @@ -10,7 +5,7 @@ RenderScriptScriptGroup.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbBreakpoint Index: lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt +++ lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT LLDB_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lldb_library(lldbPluginExpressionParserClang ASTResultSynthesizer.cpp ASTStructExtractor.cpp @@ -29,7 +25,7 @@ NameSearchContext.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbCore Index: lldb/source/Expression/CMakeLists.txt =================================================================== --- lldb/source/Expression/CMakeLists.txt +++ lldb/source/Expression/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT LLDB_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lldb_library(lldbExpression DiagnosticManager.cpp DWARFExpression.cpp @@ -18,7 +14,7 @@ UtilityFunction.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbCore Index: lldb/CMakeLists.txt =================================================================== --- lldb/CMakeLists.txt +++ lldb/CMakeLists.txt @@ -64,7 +64,7 @@ # some of these generated headers. This approach is copied from Clang's main # CMakeLists.txt, so it should kept in sync the code in Clang which was added # in llvm-svn 308844. -if(LLVM_ENABLE_MODULES AND NOT LLDB_BUILT_STANDALONE) +if(LLVM_ENABLE_MODULES) list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen) endif() Index: lld/wasm/CMakeLists.txt =================================================================== --- lld/wasm/CMakeLists.txt +++ lld/wasm/CMakeLists.txt @@ -2,10 +2,6 @@ tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(WasmOptionsTableGen) -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldWasm Driver.cpp InputChunks.cpp @@ -37,5 +33,5 @@ DEPENDS WasmOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) Index: lld/lib/Core/CMakeLists.txt =================================================================== --- lld/lib/Core/CMakeLists.txt +++ lld/lib/Core/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldCore DefinedAtom.cpp Error.cpp @@ -24,5 +20,5 @@ ${LLVM_PTHREAD_LIB} DEPENDS - ${tablegen_deps} + intrinsics_gen ) Index: lld/MinGW/CMakeLists.txt =================================================================== --- lld/MinGW/CMakeLists.txt +++ lld/MinGW/CMakeLists.txt @@ -2,10 +2,6 @@ tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(MinGWOptionsTableGen) -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldMinGW Driver.cpp @@ -19,5 +15,5 @@ DEPENDS MinGWOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) Index: lld/ELF/CMakeLists.txt =================================================================== --- lld/ELF/CMakeLists.txt +++ lld/ELF/CMakeLists.txt @@ -2,10 +2,6 @@ tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(ELFOptionsTableGen) -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldELF AArch64ErrataFix.cpp Arch/AArch64.cpp @@ -66,5 +62,5 @@ DEPENDS ELFOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) Index: lld/Common/CMakeLists.txt =================================================================== --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc) find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc) @@ -57,5 +53,5 @@ ${LLVM_PTHREAD_LIB} DEPENDS - ${tablegen_deps} + intrinsics_gen ) Index: lld/COFF/CMakeLists.txt =================================================================== --- lld/COFF/CMakeLists.txt +++ lld/COFF/CMakeLists.txt @@ -2,10 +2,6 @@ tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(COFFOptionsTableGen) -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldCOFF Chunks.cpp DebugTypes.cpp @@ -48,5 +44,5 @@ DEPENDS COFFOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) Index: clang/tools/driver/CMakeLists.txt =================================================================== --- clang/tools/driver/CMakeLists.txt +++ clang/tools/driver/CMakeLists.txt @@ -24,10 +24,6 @@ set(support_plugins SUPPORT_PLUGINS) endif() -if(NOT CLANG_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_clang_tool(clang driver.cpp cc1_main.cpp @@ -35,7 +31,7 @@ cc1gen_reproducer_main.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen ${support_plugins} ) Index: clang/tools/clang-offload-wrapper/CMakeLists.txt =================================================================== --- clang/tools/clang-offload-wrapper/CMakeLists.txt +++ clang/tools/clang-offload-wrapper/CMakeLists.txt @@ -1,14 +1,10 @@ set(LLVM_LINK_COMPONENTS BitWriter Core Support TransformUtils) -if(NOT CLANG_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_clang_tool(clang-offload-wrapper ClangOffloadWrapper.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen ) set(CLANG_OFFLOAD_WRAPPER_LIB_DEPS Index: clang/tools/clang-offload-bundler/CMakeLists.txt =================================================================== --- clang/tools/clang-offload-bundler/CMakeLists.txt +++ clang/tools/clang-offload-bundler/CMakeLists.txt @@ -1,14 +1,10 @@ set(LLVM_LINK_COMPONENTS Object Support) -if(NOT CLANG_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_clang_tool(clang-offload-bundler ClangOffloadBundler.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen ) set(CLANG_OFFLOAD_BUNDLER_LIB_DEPS Index: clang/tools/clang-import-test/CMakeLists.txt =================================================================== --- clang/tools/clang-import-test/CMakeLists.txt +++ clang/tools/clang-import-test/CMakeLists.txt @@ -3,14 +3,10 @@ Support ) -if(NOT CLANG_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_clang_executable(clang-import-test clang-import-test.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen ) set(CLANG_IMPORT_TEST_LIB_DEPS Index: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt =================================================================== --- clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt +++ clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt @@ -16,15 +16,9 @@ native ) -# Depend on LLVM IR intrinsic generation. -set(handle_llvm_deps intrinsics_gen) -if (CLANG_BUILT_STANDALONE) - set(handle_llvm_deps) -endif() - add_clang_library(clangHandleLLVM handle_llvm.cpp DEPENDS - ${handle_llvm_deps} + intrinsics_gen ) Index: clang/lib/Frontend/CMakeLists.txt =================================================================== --- clang/lib/Frontend/CMakeLists.txt +++ clang/lib/Frontend/CMakeLists.txt @@ -8,11 +8,6 @@ Support ) -set(optional_deps intrinsics_gen) -if (CLANG_BUILT_STANDALONE) - set(optional_deps) -endif() - add_clang_library(clangFrontend ASTConsumers.cpp ASTMerge.cpp @@ -49,7 +44,7 @@ DEPENDS ClangDriverOptions - ${optional_deps} + intrinsics_gen LINK_LIBS clangAST Index: clang/lib/CodeGen/CMakeLists.txt =================================================================== --- clang/lib/CodeGen/CMakeLists.txt +++ clang/lib/CodeGen/CMakeLists.txt @@ -26,15 +26,6 @@ TransformUtils ) -# In a standard Clang+LLVM build, we need to generate intrinsics before -# building codegen. In a standalone build, LLVM is already built and we don't -# need this dependency. Furthermore, LLVM doesn't export it so we can't have -# this dependency. -set(codegen_deps intrinsics_gen) -if (CLANG_BUILT_STANDALONE) - set(codegen_deps) -endif() - if (MSVC) set_source_files_properties(CodeGenModule.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif() @@ -98,7 +89,7 @@ VarBypassDetector.cpp DEPENDS - ${codegen_deps} + intrinsics_gen LINK_LIBS clangAnalysis Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -527,7 +527,7 @@ # Force target to be built as soon as possible. Clang modules builds depend # header-wise on it as they ship all headers from the umbrella folders. Building # an entire module might include header, which depends on intrinsics_gen. -if(LLVM_ENABLE_MODULES AND NOT CLANG_BUILT_STANDALONE) +if(LLVM_ENABLE_MODULES) list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen) endif()
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits