[llvm-branch-commits] [compiler-rt] 9988220 - [compiler-rt] Handle non-canonical triples with new runtime lib layout
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 15 07:04:21 PDT 2022
Author: Rainer Orth
Date: 2022-09-15T16:03:43+02:00
New Revision: 99882208e2346bee52e8a4fd182675d52e3b182c
URL: https://github.com/llvm/llvm-project/commit/99882208e2346bee52e8a4fd182675d52e3b182c
DIFF: https://github.com/llvm/llvm-project/commit/99882208e2346bee52e8a4fd182675d52e3b182c.diff
LOG: [compiler-rt] Handle non-canonical triples with new runtime lib layout
As described in Issue #54196
<https://github.com/llvm/llvm-project/issues/54196>, the ideas of `clang`
and `compiler-rt` where runtime libs are located with
`-DLLVM_ENABLE_RUNTIMES` can differ. This is the `compiler-rt` side of the
patch I've used to get them in sync for the `amd64-pc-solaris2.11` and
`sparc64-unknown-linux-gnu` release builds.
Tested on `amd64-pc-solaris2.11` and `sparc64-unknown-linux-gnu`.
Differential Revision: https://reviews.llvm.org/D133406
(cherry picked from commit cadc9cdedfef892b00b17658a823e4846a71e3ac)
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 9b5e03a6607ba..e322af89a0427 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -484,6 +484,10 @@ function(get_compiler_rt_target arch variable)
set(target "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
elseif(ANDROID AND ${arch} STREQUAL "i386")
set(target "i686${triple_suffix}")
+ elseif(${arch} STREQUAL "amd64")
+ set(target "x86_64${triple_suffix}")
+ elseif(${arch} STREQUAL "sparc64")
+ set(target "sparcv9${triple_suffix}")
else()
set(target "${arch}${triple_suffix}")
endif()
More information about the llvm-branch-commits
mailing list