[llvm-exegesis] Move libpfm linking to LLVMExegesis.

Summary: This patch moves linking of libpfm from different places to a single one.

Reviewers: courbet

Subscribers: mgorny, tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D48075

llvm-svn: 334499
This commit is contained in:
Guillaume Chatelet 2018-06-12 13:07:16 +00:00
parent e6954cb2a1
commit 0782881161
3 changed files with 4 additions and 8 deletions

View File

@ -9,7 +9,3 @@ add_llvm_tool(llvm-exegesis
add_subdirectory(lib)
target_link_libraries(llvm-exegesis PRIVATE LLVMExegesis)
if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
target_link_libraries(llvm-exegesis PRIVATE pfm)
endif()

View File

@ -27,5 +27,9 @@ llvm_map_components_to_libnames(libs
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

@ -17,10 +17,6 @@ add_llvm_unittest(LLVMExegesisTests
)
target_link_libraries(LLVMExegesisTests PRIVATE LLVMExegesis)
if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
target_link_libraries(LLVMExegesisTests PRIVATE pfm)
endif()
if(LLVM_TARGETS_TO_BUILD MATCHES "X86")
add_subdirectory(X86)
endif()