[PATCH] D148319: [compiler-rt] [test] [asan] Skip the static asan testsuites on mingw targets
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 22 12:54:21 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6510163242b6: [compiler-rt] [test] [asan] Skip the static asan testsuites on mingw targets (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148319/new/
https://reviews.llvm.org/D148319
Files:
compiler-rt/test/asan/CMakeLists.txt
Index: compiler-rt/test/asan/CMakeLists.txt
===================================================================
--- compiler-rt/test/asan/CMakeLists.txt
+++ compiler-rt/test/asan/CMakeLists.txt
@@ -55,11 +55,15 @@
endif()
string(TOUPPER ${arch} ARCH_UPPER_CASE)
set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config)
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
- )
- list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
+ if(NOT MINGW)
+ # MinGW environments don't provide a statically linked CRT, so only the
+ # dynamic asan test configuration can be expected to work.
+ configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
+ )
+ list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
+ endif()
if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME)
string(TOLOWER "-${arch}-${OS_NAME}-dynamic" ASAN_TEST_CONFIG_SUFFIX)
@@ -132,10 +136,14 @@
set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config)
set(CONFIG_NAME_DYNAMIC ${ARCH_UPPER_CASE}${OS_NAME}DynamicConfig)
- set(ASAN_TEST_DYNAMIC False)
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME}/lit.site.cfg.py)
+ if(NOT MINGW)
+ # MinGW environments don't provide a statically linked CRT, so only the
+ # dynamic asan test configuration can be expected to work.
+ set(ASAN_TEST_DYNAMIC False)
+ configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME}/lit.site.cfg.py)
+ endif()
if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME)
set(ASAN_TEST_DYNAMIC True)
configure_lit_site_cfg(
@@ -144,8 +152,10 @@
endif()
# FIXME: support unit test in the android test runner
if (NOT ANDROID)
- list(APPEND ASAN_TEST_DEPS AsanUnitTests)
- list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME})
+ if (NOT MINGW)
+ list(APPEND ASAN_TEST_DEPS AsanUnitTests)
+ list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME})
+ endif()
if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME)
list(APPEND ASAN_DYNAMIC_TEST_DEPS AsanDynamicUnitTests)
list(APPEND ASAN_DYNAMIC_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME_DYNAMIC})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148319.516100.patch
Type: text/x-patch
Size: 2546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230422/d40d067c/attachment.bin>
More information about the llvm-commits
mailing list