Skip to content

Commit

Permalink
[compiler-rt] Handle non-canonical triples with new runtime lib layout
Browse files Browse the repository at this point in the history
As described in Issue #54196
<#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 cadc9cd)
  • Loading branch information
rorth authored and tru committed Sep 15, 2022
1 parent 8b75172 commit 9988220
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Expand Up @@ -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()
Expand Down

0 comments on commit 9988220

Please sign in to comment.