[compiler-rt] [compiler-rt] Only build SME ABI routines for baremetal or platforms that have sys/auxv.h (PR #69423)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 23:44:07 PDT 2023
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/69423
This avoids link failures on other platorms that don't (yet) have an implementation of __aarch64_sme_accessible.
>From 0b0212edec0396f5e174f0ed9397048f7f398f11 Mon Sep 17 00:00:00 2001
From: Sander de Smalen <sander.desmalen at arm.com>
Date: Wed, 18 Oct 2023 06:11:45 +0000
Subject: [PATCH] [compiler-rt] Only build SME ABI routines for baremetal or
platforms that have sys/auxv.h.
This avoids link failures on other platorms that don't have an
implementation of __aarch64_sme_accessible.
---
compiler-rt/lib/builtins/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 4f210a5c0fef90f..cf2648233b0cf8f 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -555,8 +555,9 @@ set(aarch64_SOURCES
aarch64/fp_mode.c
)
-if(COMPILER_RT_HAS_ASM_SME)
+if(COMPILER_RT_HAS_ASM_SME AND (COMPILER_RT_HAS_AUXV OR COMPILER_RT_BAREMETAL_BUILD))
list(APPEND aarch64_SOURCES aarch64/sme-abi.S aarch64/sme-abi-init.c)
+ message(STATUS "AArch64 SME ABI routines enabled")
else()
message(STATUS "AArch64 SME ABI routines disabled")
endif()
More information about the llvm-commits
mailing list