[PATCH] D40972: [cmake] Support moving debuginfo-tests to llvm/projects
Don Hinton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 11:00:57 PST 2017
hintonda created this revision.
Herald added subscribers: JDevlieghere, mgorny.
Support moving debuginfo-tests to llvm/projects
----
This is one of two independent patches designed to support moving the
debuginfo-test repo from clang/test to llvm/projects. While each
patch is completely independent and can be applied seperately, both
are required to actually move the repo.
Due to the independent nature of these patches, debuginfo-test can
coexist in both clang/test and llvm/projects, so testers can add
debuginfo-test to llvm/projects without the need to immediately remove
it from clang/test.
Once both patches land and all buildbots have moved debuginfo-test to
llvm/projects, llvm/utils/test-debuginfo.pl can be removed as well the
tools reference to it in clang/test/lit.cfg.py. At which point, only
llvm/projects will be supported.
https://reviews.llvm.org/D40972
Files:
CMakeLists.txt
projects/CMakeLists.txt
utils/lit/lit/llvm/config.py
Index: utils/lit/lit/llvm/config.py
===================================================================
--- utils/lit/lit/llvm/config.py
+++ utils/lit/lit/llvm/config.py
@@ -416,8 +416,10 @@
self.config.substitutions.append(
('%target_itanium_abi_host_triple', ''))
- self.config.substitutions.append(
- ('%src_include_dir', self.config.clang_src_dir + '/include'))
+ clang_src_dir = getattr(self.config, 'clang_src_dir', None)
+ if clang_src_dir:
+ self.config.substitutions.append(
+ ('%src_include_dir', os.path.join(clang_src_dir, 'include')))
# FIXME: Find nicer way to prohibit this.
self.config.substitutions.append(
Index: projects/CMakeLists.txt
===================================================================
--- projects/CMakeLists.txt
+++ projects/CMakeLists.txt
@@ -10,6 +10,7 @@
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND
+ (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/parallel-libs) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp))
add_subdirectory(${entry})
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -110,7 +110,7 @@
# LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
# This allows an easy way of setting up a build directory for llvm and another
# one for llvm+clang+... using the same sources.
-set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly")
+set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly,debuginfo-tests")
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
@@ -885,13 +885,16 @@
endif()
if( LLVM_INCLUDE_TESTS )
- if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
- include(LLVMExternalProjectUtils)
- llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
- USE_TOOLCHAIN
- EXCLUDE_FROM_ALL
- NO_INSTALL
- ALWAYS_CLEAN)
+ if(TARGET clang)
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite)
+ include(LLVMExternalProjectUtils)
+ llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
+ USE_TOOLCHAIN
+ EXCLUDE_FROM_ALL
+ NO_INSTALL
+ ALWAYS_CLEAN)
+ endif()
+ add_llvm_external_project(debuginfo-tests projects/debuginfo-tests)
endif()
add_subdirectory(utils/lit)
add_subdirectory(test)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40972.126000.patch
Type: text/x-patch
Size: 2855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171207/9106f964/attachment.bin>
More information about the llvm-commits
mailing list