Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Dec 10, 2025

This patch removes explicit dependencies on cxx_experimental for
installations that are local to the test suite. Such dependencies
are not required anymore from the test-suite installation targets
since the proper dependency is now encoded between cxx and
cxx_experimental.

…talls

This patch removes explicit dependencies on cxx_experimental for
installations that are local to the test suite. Such dependencies
are not required anymore from the test-suite installation targets
since the proper dependency is now encoded between cxx and
cxx_experimental.
@ldionne ldionne force-pushed the review/fix-test-suite-dependencies branch from 693ea8f to ca5ec85 Compare December 11, 2025 14:12
@ldionne ldionne marked this pull request as ready for review December 11, 2025 14:12
@ldionne ldionne requested review from a team as code owners December 11, 2025 14:12
@ldionne ldionne requested a review from arichardson December 11, 2025 14:12
@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 Dec 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2025

@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-libunwind

Author: Louis Dionne (ldionne)

Changes

This patch removes explicit dependencies on cxx_experimental for
installations that are local to the test suite. Such dependencies
are not required anymore from the test-suite installation targets
since the proper dependency is now encoded between cxx and
cxx_experimental.


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

4 Files Affected:

  • (modified) libcxx/src/CMakeLists.txt (+2-5)
  • (modified) libcxx/test/CMakeLists.txt (-3)
  • (modified) libcxxabi/test/CMakeLists.txt (-3)
  • (modified) libunwind/test/CMakeLists.txt (+1-1)
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 3d70e1197236a..2c04cbd1b2729 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -345,8 +345,8 @@ set_target_properties(cxx_experimental
 cxx_add_common_build_flags(cxx_experimental)
 target_compile_options(cxx_experimental PUBLIC -D_LIBCPP_ENABLE_EXPERIMENTAL)
 
-# Add a meta-target for both libraries.
-add_custom_target(cxx)
+# Add a meta-target for both libraries and the experimental library.
+add_custom_target(cxx DEPENDS cxx_experimental)
 if (LIBCXX_ENABLE_SHARED)
   add_dependencies(cxx cxx_shared)
 endif()
@@ -389,9 +389,6 @@ if (NOT CMAKE_CONFIGURATION_TYPES)
   add_custom_target(install-cxx-stripped
     COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_BINARY_DIR}" --component cxx --strip)
 
-  add_dependencies(install-cxx cxx_experimental)
-  add_dependencies(install-cxx-stripped cxx_experimental)
-
   if (LIBCXX_INSTALL_LIBRARY)
     add_dependencies(install-cxx cxx)
     add_dependencies(install-cxx-stripped cxx)
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index 8db36bcda944c..6294319815b42 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -19,9 +19,6 @@ foreach(target IN LISTS libcxx_test_suite_install_targets)
                                                --component "${target}")
   add_dependencies(cxx-test-depends libcxx-test-suite-install-${target})
 endforeach()
-if (TARGET cxx_experimental)
-  add_dependencies(libcxx-test-suite-install-cxx cxx_experimental)
-endif()
 
 set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
 set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick them up\n")
diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt
index fadc818da2dc7..bc0902054a3be 100644
--- a/libcxxabi/test/CMakeLists.txt
+++ b/libcxxabi/test/CMakeLists.txt
@@ -23,9 +23,6 @@ foreach(target IN LISTS libcxxabi_test_suite_install_targets)
                                                --component "${target}")
   add_dependencies(cxxabi-test-depends libcxxabi-test-suite-install-${target})
 endforeach()
-if (TARGET cxx_experimental)
-  add_dependencies(libcxxabi-test-suite-install-cxx cxx_experimental)
-endif()
 
 pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
 
diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt
index 42838218dac49..2559ab34f9d5b 100644
--- a/libunwind/test/CMakeLists.txt
+++ b/libunwind/test/CMakeLists.txt
@@ -15,7 +15,7 @@ endmacro()
 set(LIBUNWIND_TESTING_INSTALL_PREFIX "${LIBUNWIND_BINARY_DIR}/test-suite-install")
 set(libunwind_test_suite_install_targets unwind-headers unwind)
 if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
-  list(APPEND libunwind_test_suite_install_targets cxx-headers cxx cxx_experimental cxx-modules cxxabi-headers cxxabi)
+  list(APPEND libunwind_test_suite_install_targets cxx-headers cxx cxx-modules cxxabi-headers cxxabi)
 endif()
 foreach(target IN LISTS libunwind_test_suite_install_targets)
   add_custom_target(libunwind-test-suite-install-${target} DEPENDS "${target}"

@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2025

@llvm/pr-subscribers-libcxxabi

Author: Louis Dionne (ldionne)

Changes

This patch removes explicit dependencies on cxx_experimental for
installations that are local to the test suite. Such dependencies
are not required anymore from the test-suite installation targets
since the proper dependency is now encoded between cxx and
cxx_experimental.


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

4 Files Affected:

  • (modified) libcxx/src/CMakeLists.txt (+2-5)
  • (modified) libcxx/test/CMakeLists.txt (-3)
  • (modified) libcxxabi/test/CMakeLists.txt (-3)
  • (modified) libunwind/test/CMakeLists.txt (+1-1)
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 3d70e1197236a..2c04cbd1b2729 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -345,8 +345,8 @@ set_target_properties(cxx_experimental
 cxx_add_common_build_flags(cxx_experimental)
 target_compile_options(cxx_experimental PUBLIC -D_LIBCPP_ENABLE_EXPERIMENTAL)
 
-# Add a meta-target for both libraries.
-add_custom_target(cxx)
+# Add a meta-target for both libraries and the experimental library.
+add_custom_target(cxx DEPENDS cxx_experimental)
 if (LIBCXX_ENABLE_SHARED)
   add_dependencies(cxx cxx_shared)
 endif()
@@ -389,9 +389,6 @@ if (NOT CMAKE_CONFIGURATION_TYPES)
   add_custom_target(install-cxx-stripped
     COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_BINARY_DIR}" --component cxx --strip)
 
-  add_dependencies(install-cxx cxx_experimental)
-  add_dependencies(install-cxx-stripped cxx_experimental)
-
   if (LIBCXX_INSTALL_LIBRARY)
     add_dependencies(install-cxx cxx)
     add_dependencies(install-cxx-stripped cxx)
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index 8db36bcda944c..6294319815b42 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -19,9 +19,6 @@ foreach(target IN LISTS libcxx_test_suite_install_targets)
                                                --component "${target}")
   add_dependencies(cxx-test-depends libcxx-test-suite-install-${target})
 endforeach()
-if (TARGET cxx_experimental)
-  add_dependencies(libcxx-test-suite-install-cxx cxx_experimental)
-endif()
 
 set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
 set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick them up\n")
diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt
index fadc818da2dc7..bc0902054a3be 100644
--- a/libcxxabi/test/CMakeLists.txt
+++ b/libcxxabi/test/CMakeLists.txt
@@ -23,9 +23,6 @@ foreach(target IN LISTS libcxxabi_test_suite_install_targets)
                                                --component "${target}")
   add_dependencies(cxxabi-test-depends libcxxabi-test-suite-install-${target})
 endforeach()
-if (TARGET cxx_experimental)
-  add_dependencies(libcxxabi-test-suite-install-cxx cxx_experimental)
-endif()
 
 pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
 
diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt
index 42838218dac49..2559ab34f9d5b 100644
--- a/libunwind/test/CMakeLists.txt
+++ b/libunwind/test/CMakeLists.txt
@@ -15,7 +15,7 @@ endmacro()
 set(LIBUNWIND_TESTING_INSTALL_PREFIX "${LIBUNWIND_BINARY_DIR}/test-suite-install")
 set(libunwind_test_suite_install_targets unwind-headers unwind)
 if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
-  list(APPEND libunwind_test_suite_install_targets cxx-headers cxx cxx_experimental cxx-modules cxxabi-headers cxxabi)
+  list(APPEND libunwind_test_suite_install_targets cxx-headers cxx cxx-modules cxxabi-headers cxxabi)
 endif()
 foreach(target IN LISTS libunwind_test_suite_install_targets)
   add_custom_target(libunwind-test-suite-install-${target} DEPENDS "${target}"

@ldionne
Copy link
Member Author

ldionne commented Dec 11, 2025

I don't understand the Windows build failures. I'm struggling to see how that might be related to this patch. Re-running.

@ldionne
Copy link
Member Author

ldionne commented Dec 12, 2025

Ok, the CI issue seems to be transient. It's the first time I see it, so I'll merge, but if we start seeing this more often we'll need to investigate.

@ldionne ldionne merged commit 4ffd373 into llvm:main Dec 12, 2025
76 of 79 checks passed
@ldionne ldionne deleted the review/fix-test-suite-dependencies branch December 12, 2025 17:09
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.

4 participants