[libcxx-commits] [libcxx] [libcxx] [test] Merge the MinGW static/shared test config files (PR #111759)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 9 13:41:12 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Martin Storsjö (mstorsjo)
<details>
<summary>Changes</summary>
These were split in 0e8208eca1c316b7302de7803ab0d85a1dd77076, with the only functional difference between them at the time being `--prepend_env PATH=%{lib-dir}` in the static config and `--prepend_env PATH=%{install-prefix}/bin` in the shared library config.
However this difference is unnecessary - the static library config doesn't need any `--prepend_env` argument at all. Before 0e8208eca1c316b7302de7803ab0d85a1dd77076, both configurations used the same config file, where the `--prepend_env` argument was unnecessary but benign in the static case.
Reduce the unnecessary config duplication in this case, and return these configs to using one single config file for both setups.
---
Full diff: https://github.com/llvm/llvm-project/pull/111759.diff
3 Files Affected:
- (modified) libcxx/CMakeLists.txt (+1-5)
- (renamed) libcxx/test/configs/llvm-libc++-mingw.cfg.in (+1-1)
- (removed) libcxx/test/configs/llvm-libc++-static-mingw.cfg.in (-25)
``````````diff
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index f1942e963ccc31..75c926f5432aea 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -131,11 +131,7 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
elseif(MINGW)
- if (LIBCXX_ENABLE_SHARED)
- set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-mingw.cfg.in")
- else()
- set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-static-mingw.cfg.in")
- endif()
+ set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-mingw.cfg.in")
elseif(WIN32) # clang-cl
if (LIBCXX_ENABLE_SHARED)
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-clangcl.cfg.in")
diff --git a/libcxx/test/configs/llvm-libc++-shared-mingw.cfg.in b/libcxx/test/configs/llvm-libc++-mingw.cfg.in
similarity index 92%
rename from libcxx/test/configs/llvm-libc++-shared-mingw.cfg.in
rename to libcxx/test/configs/llvm-libc++-mingw.cfg.in
index 8868f0cadd2aa2..01c4d58ca05f96 100644
--- a/libcxx/test/configs/llvm-libc++-shared-mingw.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-mingw.cfg.in
@@ -1,5 +1,5 @@
# This testing configuration handles running the test suite against LLVM's libc++
-# using a DLL with MinGW/Clang on Windows.
+# 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')
diff --git a/libcxx/test/configs/llvm-libc++-static-mingw.cfg.in b/libcxx/test/configs/llvm-libc++-static-mingw.cfg.in
deleted file mode 100644
index fb2f9065898a54..00000000000000
--- a/libcxx/test/configs/llvm-libc++-static-mingw.cfg.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# This testing configuration handles running the test suite against LLVM's libc++
-# using 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 %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support'
-))
-config.substitutions.append(('%{link_flags}',
- '-nostdlib++ -L %{lib-dir} -lc++'
-))
-config.substitutions.append(('%{exec}',
- '%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
-))
-
-import os, site
-site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', '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
-)
``````````
</details>
https://github.com/llvm/llvm-project/pull/111759
More information about the libcxx-commits
mailing list