[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 29 11:23:28 PDT 2022


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: compiler-rt/lib/xray/tests/CMakeLists.txt:68-80
+    if (COMPILER_RT_HAS_LLVMXRAY OR COMPILER_RT_HAS_LLVMTESTINGSUPPORT)
+      if (LLVM_LINK_LLVM_DYLIB)
+        list(APPEND XRAY_UNITTEST_LINK_FLAGS -lLLVM)
+      endif()
+    else()
+      if (COMPILER_RT_HAS_LLVMXRAY)
+        list(APPEND XRAY_UNITTEST_LINK_FLAGS -lLLVMXRay)
----------------
Rather than manually linking against libraries and their dependencies (which may change over time and break this code), we should use import targets provided by the LLVM CMake config: `LLVMXRay` and `LLVMTestingSupport`. That can be done in a follow up change though.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137024/new/

https://reviews.llvm.org/D137024



More information about the cfe-commits mailing list