Skip to content

[ARM][Compiler-RT] Add optional exclusion of libc provided ARM AEABI builtins from compiler-rt. #137952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions compiler-rt/lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ set(GENERIC_TF_SOURCES
option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
"Skip the atomic builtin (these should normally be provided by a shared library)"
On)
option(COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS
"Skip the standard C library provided arm aeabi builtins from compiler-rt)"
Off)

if(NOT FUCHSIA AND NOT COMPILER_RT_BAREMETAL_BUILD AND NOT COMPILER_RT_GPU_BUILD)
set(GENERIC_SOURCES
Expand Down Expand Up @@ -450,7 +453,7 @@ set(thumb1_base_SOURCES
${GENERIC_SOURCES}
)

set(arm_EABI_SOURCES
set(arm_EABI_RT_SOURCES
arm/aeabi_cdcmp.S
arm/aeabi_cdcmpeq_check_nan.c
arm/aeabi_cfcmp.S
Expand All @@ -462,14 +465,29 @@ set(arm_EABI_SOURCES
arm/aeabi_frsub.c
arm/aeabi_idivmod.S
arm/aeabi_ldivmod.S
arm/aeabi_uidivmod.S
arm/aeabi_uldivmod.S
)

set(arm_EABI_CLIB_SOURCES
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)
set(arm_EABI_SOURCES
${arm_EABI_RT_SOURCES}
${arm_EABI_CLIB_SOURCES}
)
else()
message(STATUS "COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS is ON, so skipping __aeabi_memcmp, __aeabi_memcpy, __aeabi_memmove and __aeabi_memset Sources")
set(arm_EABI_SOURCES
${arm_EABI_RT_SOURCES}
)
endif()

set(arm_Thumb1_JT_SOURCES
arm/switch16.S
arm/switch32.S
Expand Down
Loading