diff options
author | Rainer Orth <ro@gcc.gnu.org> | 2022-09-11 11:25:53 +0200 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2022-09-15 16:03:43 +0200 |
commit | 99882208e2346bee52e8a4fd182675d52e3b182c (patch) | |
tree | 0bcb1d8f05e15a2040f0ce847bc5568822f3285e | |
parent | 8b75172a754e1cf24d43ec8affdce13e296b57d6 (diff) | |
download | llvm-99882208e2346bee52e8a4fd182675d52e3b182c.tar.gz |
[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)
-rw-r--r-- | compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake index 9b5e03a6607b..e322af89a042 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() |