diff options
author | Martin Storsjö <martin@martin.st> | 2023-03-30 00:36:51 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2023-04-06 11:07:41 +0300 |
commit | b25e989e68372ab604e6da1934e51344880db87c (patch) | |
tree | 4c428896c30ffd5870a36774553fb1abc6ce0219 /libunwind | |
parent | a33d5a9939aa3c0bcdb0f951c0bc4b96071bda2c (diff) | |
download | llvm-b25e989e68372ab604e6da1934e51344880db87c.zip llvm-b25e989e68372ab604e6da1934e51344880db87c.tar.gz llvm-b25e989e68372ab604e6da1934e51344880db87c.tar.bz2 |
[libunwind] [test] Add a mingw specific test config file
This matches how it is done for libcxx and libcxxabi.
Differential Revision: https://reviews.llvm.org/D147633
Diffstat (limited to 'libunwind')
-rw-r--r-- | libunwind/CMakeLists.txt | 4 | ||||
-rw-r--r-- | libunwind/test/configs/llvm-libunwind-mingw.cfg.in | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 647b1c4..6f12a16 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -67,7 +67,9 @@ if(LIBUNWIND_SYSROOT OR LIBUNWIND_TARGET_TRIPLE OR LIBUNWIND_GCC_TOOLCHAIN) 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") diff --git a/libunwind/test/configs/llvm-libunwind-mingw.cfg.in b/libunwind/test/configs/llvm-libunwind-mingw.cfg.in new file mode 100644 index 0000000..99d0aac --- /dev/null +++ b/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 +) |