[PATCH] D147633: [libunwind] [test] Add a mingw specific test config file

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 01:09:33 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb25e989e6837: [libunwind] [test] Add a mingw specific test config file (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147633/new/

https://reviews.llvm.org/D147633

Files:
  libunwind/CMakeLists.txt
  libunwind/test/configs/llvm-libunwind-mingw.cfg.in


Index: libunwind/test/configs/llvm-libunwind-mingw.cfg.in
===================================================================
--- /dev/null
+++ libunwind/test/configs/llvm-libunwind-mingw.cfg.in
@@ -0,0 +1,25 @@
+# This testing configuration handles running the test suite against LLVM's libunwind
+# using either a DLL or a static library, with MinGW/Clang on Windows.
+
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+config.substitutions.append(('%{flags}', ''))
+config.substitutions.append(('%{compile_flags}',
+    '-nostdinc++ -I %{include} -funwind-tables'
+))
+config.substitutions.append(('%{link_flags}',
+    '-L %{lib} -lunwind'
+))
+config.substitutions.append(('%{exec}',
+    '%{executor} --execdir %T --env PATH=%{lib} -- '
+))
+
+import os, site
+site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
+import libcxx.test.params, libcxx.test.config
+libcxx.test.config.configure(
+    libcxx.test.params.DEFAULT_PARAMETERS,
+    libcxx.test.features.DEFAULT_FEATURES,
+    config,
+    lit_config
+)
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -67,7 +67,9 @@
   message(WARNING "LIBUNWIND_SYSROOT, LIBUNWIND_TARGET_TRIPLE and LIBUNWIND_GCC_TOOLCHAIN are not supported anymore, please use the native CMake equivalents instead")
 endif()
 
-if (LIBUNWIND_ENABLE_SHARED)
+if(MINGW)
+  set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-mingw.cfg.in")
+elseif (LIBUNWIND_ENABLE_SHARED)
   set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-shared.cfg.in")
 else()
   set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-static.cfg.in")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147633.511313.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230406/ce658b52/attachment.bin>


More information about the llvm-commits mailing list