[compiler-rt] r310588 - [compiler-rt][ARM] Fix filtering of ARM targets

Oleg Ranevskyy via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 06:27:29 PDT 2017


Author: oleg
Date: Thu Aug 10 06:27:29 2017
New Revision: 310588

URL: http://llvm.org/viewvc/llvm-project?rev=310588&view=rev
Log:
[compiler-rt][ARM] Fix filtering of ARM targets

Summary:
Similarly to i686, the ARM build target has multiple names, such as armhf, armv7 and so on. Currently we get duplicated symbol definitions for these targets while compiling the library. Each duplicated definition has its generic version from `lib/builtins` and an ARM-specialized version from `lib/builtins/arm`. 

This patch fixes filtering for ARM to ignore the generic definitions if they have their ARM specializations.

Reviewers: compnerd

Reviewed By: compnerd

Subscribers: aemerson, dberris, llvm-commits, mgorny, asl, kristof.beyls

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

Modified:
    compiler-rt/trunk/lib/builtins/CMakeLists.txt

Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=310588&r1=310587&r2=310588&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Thu Aug 10 06:27:29 2017
@@ -492,9 +492,13 @@ else ()
     if (CAN_TARGET_${arch})
       # NOTE: some architectures (e.g. i386) have multiple names.  Ensure that
       # we catch them all.
-      set(_arch ${arch})
-      if("${arch}" STREQUAL "i686")
+      set(_arch ${arch})
+      if("${arch}" STREQUAL "i686")
         set(_arch "i386|i686")
+      elseif("${arch}" STREQUAL "armv6m")
+        set(_arch "arm|armv6m")
+      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
+        set(_arch "arm")
       endif()
 
       # Filter out generic versions of routines that are re-implemented in




More information about the llvm-commits mailing list