[compiler-rt] 0387254 - [AArch64][compiler-rt] Disable SME ABI routines if function multiversioning is not supported (#94973)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 01:36:00 PDT 2024
Author: Kerry McLaughlin
Date: 2024-06-12T09:35:57+01:00
New Revision: 038725468f15b96bd4a9c9d361bd3eab42bfdb66
URL: https://github.com/llvm/llvm-project/commit/038725468f15b96bd4a9c9d361bd3eab42bfdb66
DIFF: https://github.com/llvm/llvm-project/commit/038725468f15b96bd4a9c9d361bd3eab42bfdb66.diff
LOG: [AArch64][compiler-rt] Disable SME ABI routines if function multiversioning is not supported (#94973)
This prevents build failures when building with `DISABLE_AARCH64_FMV`,
see https://github.com/llvm/llvm-project/pull/92921.
Added:
Modified:
compiler-rt/lib/builtins/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 0b9e9bd7a2956..6778ae1c35263 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -561,12 +561,23 @@ set(aarch64_SOURCES
aarch64/fp_mode.c
)
-if(COMPILER_RT_HAS_AARCH64_SME AND COMPILER_RT_HAS_FNO_BUILTIN_FLAG AND (COMPILER_RT_HAS_AUXV OR COMPILER_RT_BAREMETAL_BUILD))
- list(APPEND aarch64_SOURCES aarch64/sme-abi.S aarch64/sme-abi-init.c aarch64/sme-abi-vg.c aarch64/sme-libc-routines.c)
- message(STATUS "AArch64 SME ABI routines enabled")
- set_source_files_properties(aarch64/sme-libc-routines.c PROPERTIES COMPILE_FLAGS "-fno-builtin")
-else()
- message(STATUS "AArch64 SME ABI routines disabled")
+if (COMPILER_RT_HAS_AARCH64_SME)
+ if (NOT COMPILER_RT_DISABLE_AARCH64_FMV AND COMPILER_RT_HAS_FNO_BUILTIN_FLAG AND (COMPILER_RT_HAS_AUXV OR COMPILER_RT_BAREMETAL_BUILD))
+ list(APPEND aarch64_SOURCES aarch64/sme-abi.S aarch64/sme-abi-init.c aarch64/sme-abi-vg.c aarch64/sme-libc-routines.c)
+ message(STATUS "AArch64 SME ABI routines enabled")
+ set_source_files_properties(aarch64/sme-libc-routines.c PROPERTIES COMPILE_FLAGS "-fno-builtin")
+ else()
+ if(COMPILER_RT_DISABLE_AARCH64_FMV)
+ message(WARNING "AArch64 SME ABI routines require function multiversioning support.")
+ endif()
+ if(NOT COMPILER_RT_HAS_FNO_BUILTIN_FLAG)
+ message(WARNING "AArch64 SME ABI routines require '-fno-builtin'")
+ endif()
+ if(NOT (COMPILER_RT_HAS_AUXV OR COMPILER_RT_BAREMETAL_BUILD))
+ message(WARNING "AArch64 SME ABI routines requires sys/auxv.h or COMPILER_RT_BAREMETAL_BUILD flag")
+ endif()
+ message(STATUS "AArch64 SME ABI routines disabled")
+ endif()
endif()
# Generate outline atomics helpers from lse.S base
More information about the llvm-commits
mailing list