[libunwind] 56b7461 - [libunwind] Take 2: Use the from-scratch testing configuration by default

Louis Dionne via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 06:34:44 PDT 2021


Author: Louis Dionne
Date: 2021-10-26T09:34:40-04:00
New Revision: 56b74613bf9168bb79e0088b424ec0b6dd0a66c9

URL: https://github.com/llvm/llvm-project/commit/56b74613bf9168bb79e0088b424ec0b6dd0a66c9
DIFF: https://github.com/llvm/llvm-project/commit/56b74613bf9168bb79e0088b424ec0b6dd0a66c9.diff

LOG: [libunwind] Take 2: Use the from-scratch testing configuration by default

Summary:
This commit switches libunwind from using the complicated logic in
libc++'s testing configuration to a from-scratch configuration.
I tried to make sure that all cases that were handled in the old
config were handled by this one too, so hopefully this shouldn't
break anyone. However, if you encounter issues with this change,
please let me know and feel free to revert if I don't reply quickly.

This change was engineered to be easily revertable.

This commit is a re-application of 5a8ad80b6fa5, which was reverted in
070a2ddcb665 because it broke the Bootstrapping build. This has now been
addressed by tweaking the from-scratch config.

Differential Revision: https://reviews.llvm.org/D112082

Added: 
    

Modified: 
    libunwind/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 6933d74f04fe..96477e24a259 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -90,7 +90,13 @@ set(LIBUNWIND_TEST_LINKER_FLAGS "" CACHE STRING
     "Additional linker flags for test programs.")
 set(LIBUNWIND_TEST_COMPILER_FLAGS "" CACHE STRING
     "Additional compiler flags for test programs.")
-set(LIBUNWIND_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/lit.site.cfg.in" CACHE STRING
+
+if (LIBUNWIND_ENABLE_SHARED)
+  set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-shared.cfg.in")
+else()
+  set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-static.cfg.in")
+endif()
+set(LIBUNWIND_TEST_CONFIG "${LIBUNWIND_DEFAULT_TEST_CONFIG}" CACHE STRING
   "The path to the Lit testing configuration to use when running the tests.
    If a relative path is provided, it is assumed to be relative to '<monorepo>/libunwind/test/configs'.")
 if (NOT IS_ABSOLUTE "${LIBUNWIND_TEST_CONFIG}")


        


More information about the cfe-commits mailing list