Skip to content

Commit eb09867

Browse files
committed
[ATFE] Enable COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS in the ATFE to exclude libc-provided AEABI builtins.
We don't want two implementations of the __aeabi runtime in two different libraries. We could suppress the compiler-rt implementation at build time so there's only the picolibc definition. This patch llvm/llvm-project#137952 introduced a new cmake flag called COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS to support this functionality. When enabled, this flag excludes the following ARM AEABI memory function implementations from the compiler-rt build: __aeabi_memcmp __aeabi_memset __aeabi_memcpy __aeabi_memmove These functions are already provided by standard C libraries like newlib, and picolibc, so excluding them avoids duplicate symbol definitions and reduces unnecessary code duplication. Also we can now remove the downstream patch that changed the library order to put -lc before compiler-rt builtins as there is now this recent upstream addition of the COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS flag.
1 parent c3e8379 commit eb09867

File tree

2 files changed

+1
-242
lines changed

2 files changed

+1
-242
lines changed

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ ExternalProject_Add(
296296
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
297297
-DCOMPILER_RT_BUILD_XRAY=OFF
298298
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
299+
-DCOMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS=ON
299300
-DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}
300301
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
301302
${compiler_rt_test_cmake_args}

arm-software/embedded/patches/llvm-project/0008-library-order-workaround-for-597.patch

Lines changed: 0 additions & 242 deletions
This file was deleted.

0 commit comments

Comments
 (0)