Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Oct 17, 2024

Instead of placing artifacts for testing the runtimes at /test, place those artifacts at //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.

…rtifacts

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.
@ldionne ldionne requested review from a team as code owners October 17, 2024 14:31
@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. libc++abi libc++abi C++ Runtime Library. Not libc++. libunwind labels Oct 17, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2024

@llvm/pr-subscribers-libunwind
@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-libcxxabi

Author: Louis Dionne (ldionne)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/112717.diff

4 Files Affected:

  • (modified) libcxx/CMakeLists.txt (-3)
  • (modified) libcxx/test/configs/cmake-bridge.cfg.in (+1-1)
  • (modified) libcxxabi/test/configs/cmake-bridge.cfg.in (+1-1)
  • (modified) libunwind/test/configs/cmake-bridge.cfg.in (+1-1)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 75c926f5432aea..6befb87e5556b4 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -19,7 +19,6 @@ set(CMAKE_FOLDER "libc++")
 
 set(LIBCXX_SOURCE_DIR  ${CMAKE_CURRENT_SOURCE_DIR})
 set(LIBCXX_BINARY_DIR  ${CMAKE_CURRENT_BINARY_DIR})
-set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
 
 include(GNUInstallDirs)
 include(WarningFlags)
@@ -443,8 +442,6 @@ else()
       "Path where target-specific libc++ headers should be installed.")
 endif()
 
-file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
-
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
diff --git a/libcxx/test/configs/cmake-bridge.cfg.in b/libcxx/test/configs/cmake-bridge.cfg.in
index bc9bb0e03911d4..139a6cafa2cfb3 100644
--- a/libcxx/test/configs/cmake-bridge.cfg.in
+++ b/libcxx/test/configs/cmake-bridge.cfg.in
@@ -20,7 +20,7 @@ config.name = os.path.basename('@LIBCXX_TEST_CONFIG@')
 config.test_source_root = os.path.join('@LIBCXX_SOURCE_DIR@', 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
-config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
+config.test_exec_root = os.path.join('@LIBCXX_BINARY_DIR@', 'test')
 
 # Add substitutions for bootstrapping the test suite configuration
 config.substitutions.append(('%{libcxx-dir}', '@LIBCXX_SOURCE_DIR@'))
diff --git a/libcxxabi/test/configs/cmake-bridge.cfg.in b/libcxxabi/test/configs/cmake-bridge.cfg.in
index b00eb642750c9b..1dd6b3367e4387 100644
--- a/libcxxabi/test/configs/cmake-bridge.cfg.in
+++ b/libcxxabi/test/configs/cmake-bridge.cfg.in
@@ -21,7 +21,7 @@ config.name = os.path.basename('@LIBCXXABI_TEST_CONFIG@')
 config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
-config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
+config.test_exec_root = os.path.join('@LIBCXXABI_BINARY_DIR@', 'test')
 
 # TODO: This is a non-standard Lit attribute and we should have another way of accessing this.
 config.host_triple = '@LLVM_HOST_TRIPLE@'
diff --git a/libunwind/test/configs/cmake-bridge.cfg.in b/libunwind/test/configs/cmake-bridge.cfg.in
index f627f401f9f7b5..20b61e788ab180 100644
--- a/libunwind/test/configs/cmake-bridge.cfg.in
+++ b/libunwind/test/configs/cmake-bridge.cfg.in
@@ -20,7 +20,7 @@ config.name = os.path.basename('@LIBUNWIND_TEST_CONFIG@')
 config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
-config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
+config.test_exec_root = os.path.join('@LIBUNWIND_BINARY_DIR@', 'test')
 
 # Add a few features that are common to all the configurations
 if @LIBUNWIND_USES_ARM_EHABI@:

@ldionne ldionne merged commit 8c77f4c into llvm:main Oct 17, 2024
66 of 68 checks passed
@ldionne ldionne deleted the review/cleanup-build-directory branch October 17, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++abi libc++abi C++ Runtime Library. Not libc++. libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. libunwind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants