diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 7f8e0718c2ebc6..948452661a32fa 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -531,7 +531,7 @@ list(APPEND LLVM_COMMON_DEPENDS clang-tablegen-targets) # 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() diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt index c4bedf34921cc6..8afd7219fbe1eb 100644 --- a/clang/lib/CodeGen/CMakeLists.txt +++ b/clang/lib/CodeGen/CMakeLists.txt @@ -26,15 +26,6 @@ set(LLVM_LINK_COMPONENTS 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() @@ -99,7 +90,7 @@ add_clang_library(clangCodeGen VarBypassDetector.cpp DEPENDS - ${codegen_deps} + intrinsics_gen LINK_LIBS clangAnalysis diff --git a/clang/lib/Frontend/CMakeLists.txt b/clang/lib/Frontend/CMakeLists.txt index 0e23b92e2dea92..af5446618b0368 100644 --- a/clang/lib/Frontend/CMakeLists.txt +++ b/clang/lib/Frontend/CMakeLists.txt @@ -8,11 +8,6 @@ set(LLVM_LINK_COMPONENTS 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 @@ add_clang_library(clangFrontend DEPENDS ClangDriverOptions - ${optional_deps} + intrinsics_gen LINK_LIBS clangAST diff --git a/clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt b/clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt index 47f9fdf68f409c..9ceb1d3318283b 100644 --- a/clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt +++ b/clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt @@ -16,15 +16,9 @@ set(LLVM_LINK_COMPONENTS 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 ) diff --git a/clang/tools/clang-import-test/CMakeLists.txt b/clang/tools/clang-import-test/CMakeLists.txt index 4ccc2d752aac46..e459de8f635f5b 100644 --- a/clang/tools/clang-import-test/CMakeLists.txt +++ b/clang/tools/clang-import-test/CMakeLists.txt @@ -3,14 +3,10 @@ set(LLVM_LINK_COMPONENTS 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 diff --git a/clang/tools/clang-offload-bundler/CMakeLists.txt b/clang/tools/clang-offload-bundler/CMakeLists.txt index 4ef099493364ae..2738bf02e729fe 100644 --- a/clang/tools/clang-offload-bundler/CMakeLists.txt +++ b/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 diff --git a/clang/tools/clang-offload-wrapper/CMakeLists.txt b/clang/tools/clang-offload-wrapper/CMakeLists.txt index 6f8940f88eabd4..8bcb46267a37cf 100644 --- a/clang/tools/clang-offload-wrapper/CMakeLists.txt +++ b/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 diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt index c53485ef19576b..01efebdcb929cf 100644 --- a/clang/tools/driver/CMakeLists.txt +++ b/clang/tools/driver/CMakeLists.txt @@ -24,10 +24,6 @@ if(CLANG_PLUGIN_SUPPORT) 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 @@ add_clang_tool(clang cc1gen_reproducer_main.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen ${support_plugins} ) diff --git a/lld/COFF/CMakeLists.txt b/lld/COFF/CMakeLists.txt index 4592ace373efa7..796f7a82a3de15 100644 --- a/lld/COFF/CMakeLists.txt +++ b/lld/COFF/CMakeLists.txt @@ -2,10 +2,6 @@ set(LLVM_TARGET_DEFINITIONS Options.td) 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 @@ add_lld_library(lldCOFF DEPENDS COFFOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) diff --git a/lld/Common/CMakeLists.txt b/lld/Common/CMakeLists.txt index 53649032bd987c..212328b784c5b9 100644 --- a/lld/Common/CMakeLists.txt +++ b/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 @@ add_lld_library(lldCommon ${LLVM_PTHREAD_LIB} DEPENDS - ${tablegen_deps} + intrinsics_gen ) diff --git a/lld/ELF/CMakeLists.txt b/lld/ELF/CMakeLists.txt index b89f4436288aaa..f85d0fb9f55e33 100644 --- a/lld/ELF/CMakeLists.txt +++ b/lld/ELF/CMakeLists.txt @@ -2,10 +2,6 @@ set(LLVM_TARGET_DEFINITIONS Options.td) 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 @@ add_lld_library(lldELF DEPENDS ELFOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) diff --git a/lld/MinGW/CMakeLists.txt b/lld/MinGW/CMakeLists.txt index bb0fe4a3887d7f..1dc04d73eca654 100644 --- a/lld/MinGW/CMakeLists.txt +++ b/lld/MinGW/CMakeLists.txt @@ -2,10 +2,6 @@ set(LLVM_TARGET_DEFINITIONS Options.td) 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 @@ add_lld_library(lldMinGW DEPENDS MinGWOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) diff --git a/lld/lib/Core/CMakeLists.txt b/lld/lib/Core/CMakeLists.txt index 2d4d9ded088626..d5e507536b7203 100644 --- a/lld/lib/Core/CMakeLists.txt +++ b/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 @@ add_lld_library(lldCore ${LLVM_PTHREAD_LIB} DEPENDS - ${tablegen_deps} + intrinsics_gen ) diff --git a/lld/wasm/CMakeLists.txt b/lld/wasm/CMakeLists.txt index d2ba862c1e4a0f..cd46f0a826ac95 100644 --- a/lld/wasm/CMakeLists.txt +++ b/lld/wasm/CMakeLists.txt @@ -2,10 +2,6 @@ set(LLVM_TARGET_DEFINITIONS Options.td) 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 @@ add_lld_library(lldWasm DEPENDS WasmOptionsTableGen - ${tablegen_deps} + intrinsics_gen ) diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index bf748020ea407d..b1c0597cf3b3f1 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -64,7 +64,7 @@ endif () # 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() diff --git a/lldb/source/Expression/CMakeLists.txt b/lldb/source/Expression/CMakeLists.txt index 7e2f19ed5b09a0..bf94361dd6c19c 100644 --- a/lldb/source/Expression/CMakeLists.txt +++ b/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 @@ add_lldb_library(lldbExpression UtilityFunction.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbCore diff --git a/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt b/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt index 69696b9aa76ad7..04f6cdf9d9bd5a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt +++ b/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 @@ add_lldb_library(lldbPluginExpressionParserClang NameSearchContext.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbCore diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt index c122e09e8febe0..9efb2c44d846e6 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt +++ b/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 @@ add_lldb_library(lldbPluginRenderScriptRuntime PLUGIN RenderScriptScriptGroup.cpp DEPENDS - ${tablegen_deps} + intrinsics_gen LINK_LIBS lldbBreakpoint