From 04d48111bf932c2beb51784061a41a7938032a4e Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 23 Mar 2020 11:02:11 -0400 Subject: [PATCH] Revert "Remove legacy CMake targets for libcxx and libcxxabi" This reverts commit f383fb40b. It looks like several of our build bots are still using the legacy target names, so we'll change those before we commit this change again. --- libcxx/docs/BuildingLibcxx.rst | 2 +- libcxx/docs/TestingLibcxx.rst | 4 ++-- libcxx/include/CMakeLists.txt | 3 +++ libcxx/src/CMakeLists.txt | 1 + libcxx/test/CMakeLists.txt | 2 ++ libcxxabi/src/CMakeLists.txt | 3 +++ libcxxabi/test/CMakeLists.txt | 3 +++ 7 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst index ab5c72da1c91..f2fff0e1f304 100644 --- a/libcxx/docs/BuildingLibcxx.rst +++ b/libcxx/docs/BuildingLibcxx.rst @@ -68,7 +68,7 @@ rebuilding LLVM as often. An out-of-tree build would look like this: -DLIBCXX_CXX_ABI_INCLUDE_PATHS=path/to/separate/libcxxabi/include \ path/to/llvm-project/libcxx $ make - $ make check-cxx # optional + $ make check-libcxx # optional Experimental Support for Windows diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index 0dddfd6791a8..d295d13d26f3 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -8,9 +8,9 @@ Testing libc++ Getting Started =============== -libc++ uses LIT to configure and run its tests. +libc++ uses LIT to configure and run its tests. -The primary way to run the libc++ tests is by using `make check-cxx`. +The primary way to run the libc++ tests is by using `make check-libcxx`. However since libc++ can be used in any number of possible configurations it is important to customize the way LIT builds and runs diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 2f375f144774..ca6c7c5c5675 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -270,5 +270,8 @@ if (LIBCXX_INSTALL_HEADERS) -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") # Stripping is a no-op for headers add_custom_target(install-${CXX_HEADER_TARGET}-stripped DEPENDS install-${CXX_HEADER_TARGET}) + + add_custom_target(install-libcxx-headers DEPENDS install-${CXX_HEADER_TARGET}) + add_custom_target(install-libcxx-headers-stripped DEPENDS install-${CXX_HEADER_TARGET}-stripped) endif() endif() diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index 623b85c1d4de..2a9d05473be6 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -392,4 +392,5 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND (LIBCXX_INSTALL_LIBRARY OR -DCMAKE_INSTALL_COMPONENT=cxx -DCMAKE_INSTALL_DO_STRIP=1 -P "${LIBCXX_BINARY_DIR}/cmake_install.cmake") + add_custom_target(install-libcxx DEPENDS install-cxx) endif() diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index e779bc2cbdaa..81474511b58c 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -83,6 +83,8 @@ if (LIBCXX_INCLUDE_TESTS) "Running libcxx tests" ${CMAKE_CURRENT_BINARY_DIR} DEPENDS cxx ${LIBCXX_TEST_DEPS}) + + add_custom_target(check-libcxx DEPENDS check-cxx) endif() if (LIBCXX_GENERATE_COVERAGE) diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 44aa6384e0b7..965b1e223830 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -295,4 +295,7 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND LIBCXXABI_INSTALL_LIBRARY) -DCMAKE_INSTALL_COMPONENT=cxxabi -DCMAKE_INSTALL_DO_STRIP=1 -P "${LIBCXXABI_BINARY_DIR}/cmake_install.cmake") + + # TODO: This is a legacy target name and should be removed at some point. + add_custom_target(install-libcxxabi DEPENDS install-cxxabi) endif() diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt index bedfce8bc397..b47eef750a74 100644 --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -81,3 +81,6 @@ add_lit_testsuite(check-cxxabi "Running libcxxabi tests" ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${LIBCXXABI_TEST_DEPS} ) + +# TODO: This is a legacy target name and should be removed at some point. +add_custom_target(check-libcxxabi DEPENDS check-cxxabi)