Skip to content

Commit bb4120b

Browse files
committed
fixup! [ARM][Compiler-RT] Add optional exclusion of libc provided ARM AEABI builtins from compiler-rt.
Add aeabi_memcmp.S to the set of libc-supplied builtins. Refactor the CMake logic upon adding a new optional flag.
1 parent 8eff127 commit bb4120b

File tree

1 file changed

+27
-32
lines changed

1 file changed

+27
-32
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -453,43 +453,38 @@ set(thumb1_base_SOURCES
453453
${GENERIC_SOURCES}
454454
)
455455

456+
set(arm_EABI_RT_SOURCES
457+
arm/aeabi_cdcmp.S
458+
arm/aeabi_cdcmpeq_check_nan.c
459+
arm/aeabi_cfcmp.S
460+
arm/aeabi_cfcmpeq_check_nan.c
461+
arm/aeabi_dcmp.S
462+
arm/aeabi_div0.c
463+
arm/aeabi_drsub.c
464+
arm/aeabi_fcmp.S
465+
arm/aeabi_frsub.c
466+
arm/aeabi_idivmod.S
467+
arm/aeabi_ldivmod.S
468+
arm/aeabi_uidivmod.S
469+
arm/aeabi_uldivmod.S
470+
)
471+
472+
set(arm_EABI_CLIB_SOURCES
473+
arm/aeabi_memcmp.S
474+
arm/aeabi_memcpy.S
475+
arm/aeabi_memmove.S
476+
arm/aeabi_memset.S
477+
)
478+
456479
if(NOT COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS)
457480
set(arm_EABI_SOURCES
458-
arm/aeabi_cdcmp.S
459-
arm/aeabi_cdcmpeq_check_nan.c
460-
arm/aeabi_cfcmp.S
461-
arm/aeabi_cfcmpeq_check_nan.c
462-
arm/aeabi_dcmp.S
463-
arm/aeabi_div0.c
464-
arm/aeabi_drsub.c
465-
arm/aeabi_fcmp.S
466-
arm/aeabi_frsub.c
467-
arm/aeabi_idivmod.S
468-
arm/aeabi_ldivmod.S
469-
arm/aeabi_memcmp.S
470-
arm/aeabi_memcpy.S
471-
arm/aeabi_memmove.S
472-
arm/aeabi_memset.S
473-
arm/aeabi_uidivmod.S
474-
arm/aeabi_uldivmod.S
481+
${arm_EABI_RT_SOURCES}
482+
${arm_EABI_CLIB_SOURCES}
475483
)
476484
else()
477-
message(STATUS "COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS is ON, so skipping __aeabi_memcpy, __aeabi_memmove and __aeabi_memset Sources")
485+
message(STATUS "COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS is ON, so skipping __aeabi_memcmp, __aeabi_memcpy, __aeabi_memmove and __aeabi_memset Sources")
478486
set(arm_EABI_SOURCES
479-
arm/aeabi_cdcmp.S
480-
arm/aeabi_cdcmpeq_check_nan.c
481-
arm/aeabi_cfcmp.S
482-
arm/aeabi_cfcmpeq_check_nan.c
483-
arm/aeabi_dcmp.S
484-
arm/aeabi_div0.c
485-
arm/aeabi_drsub.c
486-
arm/aeabi_fcmp.S
487-
arm/aeabi_frsub.c
488-
arm/aeabi_idivmod.S
489-
arm/aeabi_ldivmod.S
490-
arm/aeabi_memcmp.S
491-
arm/aeabi_uidivmod.S
492-
arm/aeabi_uldivmod.S
487+
${arm_EABI_RT_SOURCES}
493488
)
494489
endif()
495490

0 commit comments

Comments
 (0)