[compiler-rt] 6559330 - [compiler-rt] Only include asan on x86 architectures on Windows (#137173)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 02:17:02 PDT 2025
Author: Martin Storsjö
Date: 2025-04-25T12:16:59+03:00
New Revision: 655933070219f2b6f3a457c7e5af7edd4b5291b4
URL: https://github.com/llvm/llvm-project/commit/655933070219f2b6f3a457c7e5af7edd4b5291b4
DIFF: https://github.com/llvm/llvm-project/commit/655933070219f2b6f3a457c7e5af7edd4b5291b4.diff
LOG: [compiler-rt] Only include asan on x86 architectures on Windows (#137173)
This avoids building asan when targeting Windows on armv7 or aarch64. It
is possible to build asan successfully for those configurations (since
5ea9dd8c7076270695a1d90b9c73718e7d95e0bf and
0c391133c9201ef29273554a1505ef855ce17668), but asan isn't functional
there.
This change skips building asan for targets other than x86_32 and
x86_64.
By excluding asan from the build, we fix the "check-ubsan" target for
armv7 and aarch64 Windows. If asan is included in the build, an
ubsan-asan configuration gets added to the tests, and as asan isn't
functional for these targets, it produces a lot of test failures even
when just trying to run "check-ubsan".
Added:
Modified:
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index 2683259e93e37..ca45d7bd2af7f 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -44,6 +44,10 @@ else()
set(OS_NAME "${CMAKE_SYSTEM_NAME}")
endif()
+if (OS_NAME MATCHES "Windows")
+ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64})
+endif()
+
if(OS_NAME MATCHES "Linux")
set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${S390X}
${RISCV64} ${LOONGARCH64})
More information about the llvm-commits
mailing list