forked from OSchip/llvm-project
[CMake] Make `intrinsics_gen` dependency unconditional.
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. Reviewed By: MaskRay, JDevlieghere Differential Revision: https://reviews.llvm.org/D83454
This commit is contained in:
parent
63c081e73d
commit
53880b8cb9
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue