1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Renovate CMake files in the llvm-exegesis tool.

This attempts to move all tools over to using `add_llvm_library` for
better consistency. After doing this, I noticed it ended up as nearly a
reimplementation of https://reviews.llvm.org/rL342148, which later got
reverted in r342336 (b09a8c9bd9b819741b38071a7ccd95042ef2643a).

With ccache and ninja on a large core machine (40), I haven't run into
build errors, so I'm hopeful it's better now, though it doesn't seem to
be any different / new.

Reviewed By: stephenneuendorffer

Differential Revision: https://reviews.llvm.org/D90970
This commit is contained in:
Jameson Nash 2021-02-08 18:03:23 -05:00
parent cac4ae8ee1
commit c538107406
7 changed files with 73 additions and 62 deletions

View File

@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS
MC
MCParser
Support
native
@ -7,6 +8,9 @@ set(LLVM_LINK_COMPONENTS
add_llvm_tool(llvm-exegesis
DISABLE_LLVM_LINK_LLVM_DYLIB
llvm-exegesis.cpp
DEPENDS
intrinsics_gen
)
add_subdirectory(lib)

View File

@ -3,16 +3,17 @@ include_directories(
${LLVM_BINARY_DIR}/lib/Target/AArch64
)
add_library(LLVMExegesisAArch64
STATIC
Target.cpp
)
llvm_update_compile_flags(LLVMExegesisAArch64)
llvm_map_components_to_libnames(libs
set(LLVM_LINK_COMPONENTS
AArch64
Exegesis
Core
)
target_link_libraries(LLVMExegesisAArch64 ${libs})
set_target_properties(LLVMExegesisAArch64 PROPERTIES FOLDER "Libraries")
add_llvm_library(LLVMExegesisAArch64
DISABLE_LLVM_LINK_LLVM_DYLIB
STATIC
Target.cpp
DEPENDS
intrinsics_gen
)

View File

@ -19,7 +19,29 @@ endif()
set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} ${TARGETS_TO_APPEND}" PARENT_SCOPE)
add_library(LLVMExegesis
set(LLVM_LINK_COMPONENTS
Analysis
CodeGen
Core
ExecutionEngine
GlobalISel
MC
MCDisassembler
MCJIT
MCParser
Object
ObjectYAML
RuntimeDyld
Support
)
set(libs)
if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
list(APPEND libs pfm)
endif()
add_llvm_library(LLVMExegesis
DISABLE_LLVM_LINK_LLVM_DYLIB
STATIC
Analysis.cpp
Assembler.cpp
@ -42,28 +64,9 @@ add_library(LLVMExegesis
SnippetRepetitor.cpp
Target.cpp
UopsBenchmarkRunner.cpp
LINK_LIBS ${libs}
DEPENDS
intrinsics_gen
)
llvm_update_compile_flags(LLVMExegesis)
llvm_map_components_to_libnames(libs
Analysis
CodeGen
Core
ExecutionEngine
GlobalISel
MC
MCDisassembler
MCJIT
MCParser
Object
ObjectYAML
RuntimeDyld
Support
)
if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
list(APPEND libs pfm)
endif()
target_link_libraries(LLVMExegesis ${libs})
set_target_properties(LLVMExegesis PROPERTIES FOLDER "Libraries")

View File

@ -3,16 +3,17 @@ include_directories(
${LLVM_BINARY_DIR}/lib/Target/Mips
)
add_library(LLVMExegesisMips
STATIC
Target.cpp
)
llvm_update_compile_flags(LLVMExegesisMips)
llvm_map_components_to_libnames(libs
set(LLVM_LINK_COMPONENTS
Mips
Exegesis
Core
)
target_link_libraries(LLVMExegesisMips ${libs})
set_target_properties(LLVMExegesisMips PROPERTIES FOLDER "Libraries")
add_llvm_library(LLVMExegesisMips
DISABLE_LLVM_LINK_LLVM_DYLIB
STATIC
Target.cpp
DEPENDS
intrinsics_gen
)

View File

@ -3,16 +3,17 @@ include_directories(
${LLVM_BINARY_DIR}/lib/Target/PowerPC
)
add_library(LLVMExegesisPowerPC
STATIC
Target.cpp
)
llvm_update_compile_flags(LLVMExegesisPowerPC)
llvm_map_components_to_libnames(libs
set(LLVM_LINK_COMPONENTS
PowerPC
Exegesis
Core
)
target_link_libraries(LLVMExegesisPowerPC ${libs})
set_target_properties(LLVMExegesisPowerPC PROPERTIES FOLDER "Libraries")
add_llvm_library(LLVMExegesisPowerPC
DISABLE_LLVM_LINK_LLVM_DYLIB
STATIC
Target.cpp
DEPENDS
intrinsics_gen
)

View File

@ -3,17 +3,18 @@ include_directories(
${LLVM_BINARY_DIR}/lib/Target/X86
)
add_library(LLVMExegesisX86
set(LLVM_LINK_COMPONENTS
X86
Exegesis
Core
)
add_llvm_library(LLVMExegesisX86
DISABLE_LLVM_LINK_LLVM_DYLIB
STATIC
Target.cpp
X86Counter.cpp
)
llvm_update_compile_flags(LLVMExegesisX86)
llvm_map_components_to_libnames(libs
X86
Exegesis
DEPENDS
intrinsics_gen
)
target_link_libraries(LLVMExegesisX86 ${libs})
set_target_properties(LLVMExegesisX86 PROPERTIES FOLDER "Libraries")

View File

@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS
TableGen
)
llvm_add_library(LLVMTableGenGlobalISel STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
add_llvm_library(LLVMTableGenGlobalISel STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
CodeExpander.cpp
GIMatchDag.cpp
GIMatchDagEdge.cpp