Fixes PR37053.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 16882 Build 16882: arc lint + arc unit
Event Timeline
I don't know the build system very well but this looks good to me.
Perhaps document LLVM_ENABLE_LIBPFM in docs/CMake.rst?
cmake/config-ix.cmake | ||
---|---|---|
93 | One more piece is missing, LLVM_ENABLE_LIBPFM needs to be checked where linking to pfm happens. |
cmake/config-ix.cmake | ||
---|---|---|
93 | Thanks Roman, This is already done by checking on HAVE_LIBPFM, see tools/llvm-exegesis/CMakeLists.txt: if(HAVE_LIBPFM) target_link_libraries(llvm-exegesis PRIVATE pfm) endif() |
cmake/config-ix.cmake | ||
---|---|---|
93 | Exactly, and that is insufficient. if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM) target_link_libraries(llvm-exegesis PRIVATE pfm) endif() I'm not sure if LLVM can be built as part of some parent CMake project, so *this* may be not-an-issue, Similar problem: https://github.com/google/googletest/pull/975 |
Double check for LLVM_ENABLE_LIBPFM and HAVE_LIBPFM when linking.
cmake/config-ix.cmake | ||
---|---|---|
93 | I see, that makes sense, thanks for the explanation. |
I don't really know LLVM's buildsystem, but this looks about right to me.
Sidenote:
cmake/config-ix.cmake | ||
---|---|---|
94 | Sidenote: normally, this should be in a cmake/Modules/FindPFM.cmake, and this should be just if (LLVM_ENABLE_LIBPFM) find_package(PFM REQUIRED) endif() |
cmake/config-ix.cmake | ||
---|---|---|
94 | Good idea. I've split this off to a separate module in r329783. |
One more piece is missing, LLVM_ENABLE_LIBPFM needs to be checked where linking to pfm happens.