[builtins][Android] Fix 386->686 adjustment
authorRyan Prichard <rprichard@google.com>
Fri, 19 Jun 2020 06:57:08 +0000 (23:57 -0700)
committerRyan Prichard <rprichard@google.com>
Fri, 19 Jun 2020 23:08:20 +0000 (16:08 -0700)
At this point in this code:
 - COMPILER_RT_DEFAULT_TARGET_TRIPLE is "i686-linux-android"
 - arch is "i386"

The get_compiler_rt_target function currently turns that into:

   i686-android-linux-android

The ${COMPILER_RT_OS_SUFFIX} is "-android" and redundant, so stop
adding it.

The get_compiler_rt_target() function is used for the
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR mode that isn't normally used with
Android.

Differential Revision: https://reviews.llvm.org/D82150

compiler-rt/cmake/Modules/CompilerRTUtils.cmake

index 0a686e3..d3607ed 100644 (file)
@@ -368,7 +368,7 @@ function(get_compiler_rt_target arch variable)
     # 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}")
+    set(target "i686${triple_suffix}")
   else()
     set(target "${arch}${triple_suffix}")
   endif()