Skip to content

Commit 8c77f4c

Browse files
authored
[runtimes] Avoid cluttering the top-level build directory with test artifacts (#112717)
Instead of placing artifacts for testing the runtimes at <build>/test, place those artifacts at <build>/<project>/test. This prevents cluttering the build directory with the runtimes' test artifacts for everyone else. As a drive-by, remove LIBCXX_BINARY_INCLUDE_DIR which wasn't used anymore.
1 parent 2cd10f5 commit 8c77f4c

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

libcxx/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ set(CMAKE_FOLDER "libc++")
1919

2020
set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2121
set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
22-
set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
2322

2423
include(GNUInstallDirs)
2524
include(WarningFlags)
@@ -443,8 +442,6 @@ else()
443442
"Path where target-specific libc++ headers should be installed.")
444443
endif()
445444

446-
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
447-
448445
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
449446
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
450447
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})

libcxx/test/configs/cmake-bridge.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config.name = os.path.basename('@LIBCXX_TEST_CONFIG@')
2020
config.test_source_root = os.path.join('@LIBCXX_SOURCE_DIR@', 'test')
2121
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
2222
config.recursiveExpansionLimit = 10
23-
config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
23+
config.test_exec_root = os.path.join('@LIBCXX_BINARY_DIR@', 'test')
2424

2525
# Add substitutions for bootstrapping the test suite configuration
2626
config.substitutions.append(('%{libcxx-dir}', '@LIBCXX_SOURCE_DIR@'))

libcxxabi/test/configs/cmake-bridge.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ config.name = os.path.basename('@LIBCXXABI_TEST_CONFIG@')
2121
config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')
2222
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
2323
config.recursiveExpansionLimit = 10
24-
config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
24+
config.test_exec_root = os.path.join('@LIBCXXABI_BINARY_DIR@', 'test')
2525

2626
# TODO: This is a non-standard Lit attribute and we should have another way of accessing this.
2727
config.host_triple = '@LLVM_HOST_TRIPLE@'

libunwind/test/configs/cmake-bridge.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config.name = os.path.basename('@LIBUNWIND_TEST_CONFIG@')
2020
config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
2121
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
2222
config.recursiveExpansionLimit = 10
23-
config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
23+
config.test_exec_root = os.path.join('@LIBUNWIND_BINARY_DIR@', 'test')
2424

2525
# Add a few features that are common to all the configurations
2626
if @LIBUNWIND_USES_ARM_EHABI@:

0 commit comments

Comments
 (0)