[compiler-rt] r347022 - [compiler-rt] Use exact spelling when building for default target
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 20:14:23 PST 2018
Author: phosek
Date: Thu Nov 15 20:14:23 2018
New Revision: 347022
URL: http://llvm.org/viewvc/llvm-project?rev=347022&view=rev
Log:
[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
Modified:
compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
Modified: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake?rev=347022&r1=347021&r2=347022&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake Thu Nov 15 20:14:23 2018
@@ -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}")
More information about the llvm-commits
mailing list