summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-11-16 04:14:23 +0000
committerPetr Hosek <phosek@chromium.org>2018-11-16 04:14:23 +0000
commit5f5c773765b03aae78e324851d4f995580766362 (patch)
tree4b441f81e4349bc8ca6801506fe9c6aa2fd66e3d
parent1ee2987abcc3cc517e66e5b074db44b8835c0a21 (diff)
downloadbcm5719-llvm-5f5c773765b03aae78e324851d4f995580766362.tar.gz
bcm5719-llvm-5f5c773765b03aae78e324851d4f995580766362.zip
[compiler-rt] Use exact spelling when building for default target
When building for default target only, use exact target spelling when deriving the name for the per-target runtime directory. This is necessary for AArch32 where the CMake build by default rewrites the architecture which leads to unexpected results. Differential Revision: https://reviews.llvm.org/D54612 llvm-svn: 347022
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTUtils.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index d2cb4867799..c4500328e5c 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -337,7 +337,10 @@ endfunction()
function(get_compiler_rt_target arch variable)
string(FIND ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} "-" dash_index)
string(SUBSTRING ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} ${dash_index} -1 triple_suffix)
- if(ANDROID AND ${arch} STREQUAL "i386")
+ if(COMPILER_RT_DEFAULT_TARGET_ONLY)
+ # Use exact spelling when building only for the target specified to CMake.
+ set(target "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
+ elseif(ANDROID AND ${arch} STREQUAL "i386")
set(target "i686${COMPILER_RT_OS_SUFFIX}${triple_suffix}")
else()
set(target "${arch}${triple_suffix}")
OpenPOWER on IntegriCloud