Moved setting supported architecture to parent cmake configuration files
so they can be read by both lib and test CMakeList.txt.
Fixed issue with check-asan-abi that did not filter for current host architecture
which caused x86_64 bots to run Arm64 tests.
Added x86_64 as a supported arch to the test cmake file.
rdar://
110017569
Differential Revision: https://reviews.llvm.org/D151846
set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${RISCV64}
${MIPS32} ${MIPS64} ${PPC64} ${S390X} ${SPARC} ${SPARCV9} ${HEXAGON}
${LOONGARCH64})
+set(ALL_ASAN_ABI_SUPPORTED_ARCH ${X86_64} ${ARM64})
set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
if(ANDROID)
)
set(LSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
set(UBSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
+ set(ASAN_ABI_SUPPORTED_ARCH ${ALL_ASAN_ABI_SUPPORTED_ARCH})
list_intersect(ASAN_SUPPORTED_ARCH
ALL_ASAN_SUPPORTED_ARCH
SANITIZER_COMMON_SUPPORTED_ARCH)
if (APPLE)
# TODO: set in config-ix.cmake
set(ASAN_ABI_SUPPORTED_OS osx)
- set(ASAN_ABI_SUPPORTED_ARCHS ${X86_64} ${ARM64})
# Compile Stable API sources into an object library.
add_compiler_rt_object_libraries(RTASAN_ABI
OS ${ASAN_ABI_SUPPORTED_OS}
- ARCHS ${ASAN_ABI_SUPPORTED_ARCHS}
+ ARCHS ${ASAN_ABI_SUPPORTED_ARCH}
SOURCES ${ASAN_ABI_SOURCES}
ADDITIONAL_HEADERS ${ASAN_ABI_HEADERS}
CFLAGS ${SANITIZER_COMMON_CFLAGS})
add_compiler_rt_runtime(clang_rt.asan_abi
STATIC
OS ${ASAN_ABI_SUPPORTED_OS}
- ARCHS ${ASAN_ABI_SUPPORTED_ARCHS}
+ ARCHS ${ASAN_ABI_SUPPORTED_ARCH}
OBJECT_LIBS RTASAN_ABI
CFLAGS ${SANITIZER_COMMON_CFLAGS}
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
set(ASAN_ABI_TESTSUITES)
macro(get_bits_for_arch arch bits)
- if (${arch} MATCHES "arm64")
+ if (${arch} MATCHES "arm64|x86_64")
set(${bits} 64)
else()
message(FATAL_ERROR "Unknown target architecture: ${arch}")
endif()
set(ASAN_ABI_DYNAMIC_TEST_DEPS ${ASAN_ABI_TEST_DEPS})
-set(ASAN_ABI_TEST_ARCH arm64)
+set(ASAN_ABI_TEST_ARCH ${ASAN_ABI_SUPPORTED_ARCH})
+if(APPLE)
+ darwin_filter_host_archs(ASAN_ABI_SUPPORTED_ARCH ASAN_ABI_TEST_ARCH)
+endif()
foreach(arch ${ASAN_ABI_TEST_ARCH})
set(ASAN_ABI_TEST_TARGET_ARCH ${arch})