[PATCH] D38047: [libcxxabi / lit] Write generated llvm-lit script for libcxxabi
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 11:27:14 PDT 2017
zturner created this revision.
Herald added a subscriber: mgorny.
After this patch, after you run `cmake` on `libcxxabi`, you can write `bin/llvm-lit -sv <path/to/libcxxabi/test/tree>`
https://reviews.llvm.org/D38047
Files:
libcxxabi/CMakeLists.txt
libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
libcxxabi/test/CMakeLists.txt
Index: libcxxabi/test/CMakeLists.txt
===================================================================
--- libcxxabi/test/CMakeLists.txt
+++ libcxxabi/test/CMakeLists.txt
@@ -24,10 +24,9 @@
"Executor to use when running tests.")
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")
-configure_file(
+configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
- @ONLY)
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
if (LIBCXXABI_ENABLE_SHARED)
set(LIBCXXABI_TEST_DEPS cxxabi_shared)
Index: libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
===================================================================
--- libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -70,6 +70,7 @@
return()
endif()
+ set(LLVM_LIT_OUTPUT_DIR "${libcxxabi_BINARY_DIR}/bin")
set(LLVM_FOUND ON)
endmacro(find_llvm_parts)
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -454,3 +454,9 @@
add_subdirectory(test)
add_subdirectory(fuzz)
endif()
+
+if (EXISTS "${LLVM_MAIN_SRC_DIR}/utils/llvm-lit")
+ add_subdirectory("${LLVM_MAIN_SRC_DIR}/utils/llvm-lit"
+ "${CMAKE_CURRENT_BINARY_DIR}/llvm-lit")
+endif()
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38047.115873.patch
Type: text/x-patch
Size: 1395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/80c66c59/attachment.bin>
More information about the llvm-commits
mailing list