mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
# large and three small executables. This is done to minimize memory load
|
||||
# in parallel builds. Please retain this ordering.
|
||||
|
||||
if( NOT WIN32 OR MSYS OR CYGWIN )
|
||||
# It is useful to build llvm-config before the other tools, so we
|
||||
# have a fresh LibDeps.txt for regenerating the hard-coded library
|
||||
# dependencies. llvm-config/CMakeLists.txt takes care of this but we
|
||||
# must keep llvm-config as the first entry on the list of tools to
|
||||
# be built.
|
||||
add_subdirectory(llvm-config)
|
||||
endif()
|
||||
|
||||
add_subdirectory(opt)
|
||||
add_subdirectory(llvm-as)
|
||||
add_subdirectory(llvm-dis)
|
||||
@@ -29,4 +38,6 @@ add_subdirectory(llvmc)
|
||||
|
||||
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
|
||||
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
|
||||
endif()
|
||||
endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
|
||||
|
||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|
||||
|
@@ -1,3 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo
|
||||
linker bitreader bitwriter)
|
||||
|
||||
add_llvm_tool(bugpoint
|
||||
BugDriver.cpp
|
||||
CrashDebugger.cpp
|
||||
@@ -9,13 +12,3 @@ add_llvm_tool(bugpoint
|
||||
ToolRunner.cpp
|
||||
bugpoint.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bugpoint
|
||||
LLVMAsmParser
|
||||
LLVMInstrumentation
|
||||
LLVMScalarOpts
|
||||
LLVMipo
|
||||
LLVMLinker
|
||||
LLVMBitReader
|
||||
LLVMBitWriter
|
||||
)
|
||||
|
@@ -1,6 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} bitreader asmparser)
|
||||
|
||||
add_llvm_tool(llc
|
||||
llc.cpp
|
||||
)
|
||||
|
||||
add_llvm_link_components(llc all)
|
||||
target_link_libraries(llc LLVMBitReader LLVMAsmParser)
|
||||
|
@@ -1,6 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen bitreader selectiondag)
|
||||
|
||||
add_llvm_tool(lli
|
||||
lli.cpp
|
||||
)
|
||||
|
||||
add_llvm_link_components(lli jit interpreter nativecodegen)
|
||||
target_link_libraries(lli LLVMBitReader LLVMSelectionDAG)
|
||||
|
@@ -1,9 +1,8 @@
|
||||
set(LLVM_LINK_COMPONENTS archive)
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
|
||||
add_llvm_tool(llvm-ar
|
||||
llvm-ar.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-ar LLVMArchive)
|
||||
|
||||
# TODO: Support check-local.
|
||||
|
@@ -1,7 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS asmparser bitwriter)
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
|
||||
add_llvm_tool(llvm-as
|
||||
llvm-as.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-as LLVMAsmParser LLVMBitWriter)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS bitreader)
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
|
||||
add_llvm_tool(llvm-bcanalyzer
|
||||
llvm-bcanalyzer.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-bcanalyzer LLVMBitReader)
|
||||
|
@@ -110,6 +110,10 @@ add_custom_target(llvm-config.target ALL
|
||||
|
||||
add_dependencies(llvm-config.target ${llvm_lib_targets})
|
||||
|
||||
# Make sure that llvm-config builds before the llvm tools, so we have
|
||||
# LibDeps.txt and can use it for updating the hard-coded library
|
||||
# dependencies on cmake/modules/LLVMLibDeps.cmake when the tools'
|
||||
# build fail due to outdated dependencies:
|
||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvm-config.target)
|
||||
|
||||
install(FILES ${LLVM_CONFIG}
|
||||
@@ -118,4 +122,25 @@ install(FILES ${LLVM_CONFIG}
|
||||
DESTINATION bin)
|
||||
|
||||
|
||||
# Regeneration of library dependencies.
|
||||
|
||||
# See the comments at the end of cmake/modules/LLVMConfig.cmake for
|
||||
# notes and guidelines.
|
||||
|
||||
set(LLVMLibDeps ${LLVM_MAIN_SRC_DIR}/cmake/modules/LLVMLibDeps.cmake)
|
||||
set(LLVMLibDeps_TMP ${CMAKE_CURRENT_BINARY_DIR}/LLVMLibDeps.cmake.tmp)
|
||||
|
||||
add_custom_command(OUTPUT ${LLVMLibDeps_TMP}
|
||||
COMMAND sed -e s'@\\.a@@g' -e s'@\\.so@@g' -e 's@libLLVM@LLVM@g' -e 's@: @ @' -e 's@\\\(.*\\\)@set\(MSVC_LIB_DEPS_\\1\)@' ${FINAL_LIBDEPS} > ${LLVMLibDeps_TMP}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LLVMLibDeps_TMP} ${LLVMLibDeps}
|
||||
DEPENDS ${FINAL_LIBDEPS}
|
||||
COMMENT "Updating cmake library dependencies file ${LLVMLibDeps}"
|
||||
)
|
||||
|
||||
if( LLVM_TARGETS_TO_BUILD STREQUAL LLVM_ALL_TARGETS )
|
||||
add_custom_target(llvmlibdeps.target ALL DEPENDS ${LLVMLibDeps_TMP})
|
||||
add_dependencies(llvmlibdeps.target llvm-config.target)
|
||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvmlibdeps.target)
|
||||
endif()
|
||||
|
||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS support asmparser bitreader)
|
||||
|
||||
add_llvm_tool(llvm-diff
|
||||
llvm-diff.cpp
|
||||
DifferenceEngine.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-diff LLVMAsmParser LLVMBitReader)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS bitreader)
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
|
||||
add_llvm_tool(llvm-dis
|
||||
llvm-dis.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-dis LLVMCore LLVMBitReader)
|
||||
|
@@ -1,10 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS asmparser ipo bitreader bitwriter)
|
||||
|
||||
add_llvm_tool(llvm-extract
|
||||
llvm-extract.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-extract
|
||||
LLVMAsmParser
|
||||
LLVMipo
|
||||
LLVMBitReader
|
||||
LLVMBitWriter
|
||||
)
|
||||
|
@@ -1,12 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS ipo scalaropts linker archive bitwriter)
|
||||
|
||||
add_llvm_tool(llvm-ld
|
||||
Optimize.cpp
|
||||
llvm-ld.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-ld
|
||||
LLVMipo
|
||||
LLVMScalarOpts
|
||||
LLVMLinker
|
||||
LLVMArchive
|
||||
LLVMBitWriter
|
||||
)
|
||||
|
@@ -1,10 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS linker bitreader bitwriter asmparser)
|
||||
|
||||
add_llvm_tool(llvm-link
|
||||
llvm-link.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-link
|
||||
LLVMLinker
|
||||
LLVMBitReader
|
||||
LLVMBitWriter
|
||||
LLVMAsmParser
|
||||
)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser MCDisassembler)
|
||||
|
||||
add_llvm_tool(llvm-mc
|
||||
llvm-mc.cpp
|
||||
Disassembler.cpp
|
||||
)
|
||||
|
||||
add_llvm_link_components(llvm-mc all)
|
||||
target_link_libraries(llvm-mc LLVMMC LLVMMCParser LLVMMCDisassembler)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS archive bitreader)
|
||||
|
||||
add_llvm_tool(llvm-nm
|
||||
llvm-nm.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-nm LLVMArchive LLVMBitReader)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(LLVM_LINK_COMPONENTS bitreader analysis)
|
||||
|
||||
add_llvm_tool(llvm-prof
|
||||
llvm-prof.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-prof LLVMBitReader LLVMAnalysis)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS archive)
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
|
||||
add_llvm_tool(llvm-ranlib
|
||||
llvm-ranlib.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(llvm-ranlib LLVMArchive)
|
||||
|
@@ -1,15 +1,8 @@
|
||||
set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo)
|
||||
|
||||
add_llvm_tool(opt
|
||||
AnalysisWrappers.cpp
|
||||
GraphPrinters.cpp
|
||||
PrintSCC.cpp
|
||||
opt.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(opt
|
||||
LLVMBitReader
|
||||
LLVMAsmParser
|
||||
LLVMBitWriter
|
||||
LLVMInstrumentation
|
||||
LLVMScalarOpts
|
||||
LLVMipo
|
||||
)
|
||||
|
Reference in New Issue
Block a user