[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

Vivian Kong via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 20 09:05:36 PDT 2016


vivkong created this revision.
vivkong added reviewers: labath, beanz, tfiala.
vivkong added subscribers: lldb-commits, tfiala.
vivkong set the repository for this revision to rL LLVM.
Herald added a subscriber: mgorny.

If LLDB_PATH_TO_LLVM_BUILD is present, search for llvm-config there first before looking in CMake or system paths.

(The patch is a modified fix from @tfiala)


Repository:
  rL LLVM

https://reviews.llvm.org/D25830

Files:
  cmake/modules/LLDBStandalone.cmake


Index: cmake/modules/LLDBStandalone.cmake
===================================================================
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -12,7 +12,12 @@
 
   # Rely on llvm-config.
   set(CONFIG_OUTPUT)
-  find_program(LLVM_CONFIG "llvm-config")
+  set(FIND_PATHS "")
+  if (LLDB_PATH_TO_LLVM_BUILD)
+    set(FIND_PATHS "${LLDB_PATH_TO_LLVM_BUILD}/bin")
+  endif()
+  find_program(LLVM_CONFIG "llvm-config"
+    HINTS ${FIND_PATHS})
   if(LLVM_CONFIG)
     message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
     set(CONFIG_COMMAND ${LLVM_CONFIG}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25830.75182.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161020/39d394fc/attachment.bin>


More information about the lldb-commits mailing list