[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

llvm-svn: 310588
This commit is contained in:
Oleg Ranevskyy 2017-08-10 13:27:29 +00:00
parent 83eae8724e
commit a02114b651
1 changed files with 6 additions and 2 deletions

View File

@ -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