[PATCH] D25076: [cmake] Make LIT_COMMAND configurable and improve fallback support

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 1 06:30:23 PDT 2016


mgorny removed rL LLVM as the repository for this revision.
mgorny updated this revision to Diff 73196.
mgorny added a comment.

Since there seems to be no clean way of resetting CMakeCache.txt for all buildbots, I have reverted the original change. If I'm not mistaken, this should cause the CMakeCache.txt files to be cleaned up implicitly since LIT_COMMAND will no longer be a cache variable. After all bots rebuild cleanly, it should be possible to reintroduce the change, with the correct default value.

I've updated the patch for that. The difference is that the default needs to be semicolon-separated rather than space-separated (the non-cache 'set' variant implicitly converts ARGN to a semicolon-separated list).


https://reviews.llvm.org/D25076

Files:
  cmake/modules/AddLLVM.cmake


Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1083,10 +1083,11 @@
   if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
     list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
   endif ()
-  if (LLVM_MAIN_SRC_DIR)
-    set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+  if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+    set (LIT_COMMAND "${PYTHON_EXECUTABLE};${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py"
+         CACHE STRING "Command used to spawn llvm-lit")
   else()
-    find_program(LIT_COMMAND llvm-lit)
+    find_program(LIT_COMMAND NAMES llvm-lit lit.py lit)
   endif ()
   list(APPEND LIT_COMMAND ${LIT_ARGS})
   foreach(param ${ARG_PARAMS})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25076.73196.patch
Type: text/x-patch
Size: 803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161001/b4943a74/attachment.bin>


More information about the llvm-commits mailing list