Skip to content

Commit 4a7910b

Browse files
committed
[ATFE] Preserve __aeabi_mem* Symbols from compiler-rt when linking with llvm-libc.
Previously, the following symbols were excluded from the build due to the patch introduced in arm#326 __aeabi_memcmp __aeabi_memset __aeabi_memcpy __aeabi_memmove LLVM libc currently does not provide implementations for __aeabi* symbols. This change ensures that the above implementations from compiler-rt are preserved when linking with llvm-libc , to avoid missing symbol errors at link time.
1 parent a362409 commit 4a7910b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,12 @@ if(ENABLE_COMPILER_RT_TESTS)
264264
)
265265
endif()
266266

267+
if(NOT C_LIBRARY STREQUAL "llvmlibc")
268+
set(compiler_rt_cmake_args
269+
-DCOMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS=ON
270+
)
271+
endif()
272+
267273
ExternalProject_Add(
268274
compiler_rt
269275
SOURCE_DIR ${llvmproject_src_dir}/compiler-rt
@@ -290,13 +296,13 @@ ExternalProject_Add(
290296
-DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}
291297
-DCMAKE_SYSTEM_NAME=Generic
292298
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
299+
${compiler_rt_cmake_args}
293300
-DCOMPILER_RT_BAREMETAL_BUILD=ON
294301
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
295302
-DCOMPILER_RT_BUILD_PROFILE=OFF
296303
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
297304
-DCOMPILER_RT_BUILD_XRAY=OFF
298305
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
299-
-DCOMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS=ON
300306
-DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}
301307
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
302308
${compiler_rt_test_cmake_args}

0 commit comments

Comments
 (0)