[PATCH] D98452: [compiler-rt] Produce the right arch suffix for arm libraries
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 06:00:13 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8e11bede3a6a: [compiler-rt] Produce the right arch suffix for arm libraries (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98452/new/
https://reviews.llvm.org/D98452
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -124,6 +124,21 @@
else()
if(ANDROID AND ${arch} STREQUAL "i386")
set(${output} "${name}-i686${COMPILER_RT_OS_SUFFIX}")
+ elseif("${arch}" MATCHES "^arm")
+ if(COMPILER_RT_DEFAULT_TARGET_ONLY)
+ set(triple "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
+ else()
+ set(triple "${TARGET_TRIPLE}")
+ endif()
+ # When using arch-suffixed runtime library names, clang only looks for
+ # libraries named "arm" or "armhf", see getArchNameForCompilerRTLib in
+ # clang. Therefore, try to inspect both the arch name and the triple
+ # if it seems like we're building an armhf target.
+ if ("${arch}" MATCHES "hf$" OR "${triple}" MATCHES "hf$")
+ set(${output} "${name}-armhf${COMPILER_RT_OS_SUFFIX}")
+ else()
+ set(${output} "${name}-arm${COMPILER_RT_OS_SUFFIX}")
+ endif()
else()
set(${output} "${name}-${arch}${COMPILER_RT_OS_SUFFIX}")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98452.331535.patch
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/35aec7f1/attachment.bin>
More information about the llvm-commits
mailing list