[compiler-rt] [ARM][Compiler-RT] Add optional exclusion of libc provided ARM AEABI builtins from compiler-rt. (PR #137952)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 06:07:55 PDT 2025
================
@@ -450,25 +453,45 @@ set(thumb1_base_SOURCES
${GENERIC_SOURCES}
)
-set(arm_EABI_SOURCES
- arm/aeabi_cdcmp.S
- arm/aeabi_cdcmpeq_check_nan.c
- arm/aeabi_cfcmp.S
- arm/aeabi_cfcmpeq_check_nan.c
- arm/aeabi_dcmp.S
- arm/aeabi_div0.c
- arm/aeabi_drsub.c
- arm/aeabi_fcmp.S
- arm/aeabi_frsub.c
- arm/aeabi_idivmod.S
- arm/aeabi_ldivmod.S
- arm/aeabi_memcmp.S
- arm/aeabi_memcpy.S
- arm/aeabi_memmove.S
- arm/aeabi_memset.S
- arm/aeabi_uidivmod.S
- arm/aeabi_uldivmod.S
-)
+if(NOT COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS)
----------------
smithp35 wrote:
Instead of doing a switch between two large alternatives, could we split these up into
```
set(ARM_EABI_RT_SOURCES
// All the RT functions that are not related to C-library functions
arm/aeabi_cdcmp.S
...
)
set(arm_EABI_CLIB_SOURCES
arm/eabi_memcmp.S
arm/eabi_memcpy.S
arm/eabi_memmove.S
arm/eabi_memset.S
)
```
We can then make `arm_EABI_SOURCES` just `ARM_EABI_RT_SOURCES` or both `ARM_EABI_RT_SOURCES` and `arm_EABI_CLIB_SOURCES` based off `COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS`
That would avoid duplication, and is similar to how compiler-rt does this already for including only some files.
https://github.com/llvm/llvm-project/pull/137952
More information about the llvm-commits
mailing list