allocator: Disable PartitionAlloc memory tagging on non-glibc

Memory tagging depends on ifunc which is glibc-specific.
This commit is contained in:
klzgrad 2023-08-05 23:35:21 +08:00
parent 1c8ced41ef
commit bda7b5325d

View File

@ -152,10 +152,11 @@ static_assert(sizeof(void*) != 8, "");
(!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \ (!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
defined(ARCH_CPU_LITTLE_ENDIAN)) defined(ARCH_CPU_LITTLE_ENDIAN))
#define PA_CONFIG_HAS_MEMORY_TAGGING() \ #define PA_CONFIG_HAS_MEMORY_TAGGING() \
(defined(ARCH_CPU_ARM64) && defined(__clang__) && \ (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
!defined(ADDRESS_SANITIZER) && \ !defined(ADDRESS_SANITIZER) && \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) && \
defined(LIBC_GLIBC)
#if PA_CONFIG(HAS_MEMORY_TAGGING) #if PA_CONFIG(HAS_MEMORY_TAGGING)
static_assert(sizeof(void*) == 8); static_assert(sizeof(void*) == 8);