[compiler-rt] 975ec83 - [compiler-rt] Only build SME ABI routines for baremetal or platforms that have sys/auxv.h (#69423)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 02:39:47 PDT 2023


Author: Sander de Smalen
Date: 2023-10-18T10:39:43+01:00
New Revision: 975ec8368fcb3f9157481e78f10e589a38915116

URL: https://github.com/llvm/llvm-project/commit/975ec8368fcb3f9157481e78f10e589a38915116
DIFF: https://github.com/llvm/llvm-project/commit/975ec8368fcb3f9157481e78f10e589a38915116.diff

LOG: [compiler-rt] Only build SME ABI routines for baremetal or platforms that have sys/auxv.h (#69423)

This avoids link failures on other platorms that don't (yet) have an
implementation of __aarch64_sme_accessible.

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 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