From a02114b65151c134047dfb8e62f5873308a7f448 Mon Sep 17 00:00:00 2001 From: Oleg Ranevskyy Date: Thu, 10 Aug 2017 13:27:29 +0000 Subject: [PATCH] [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 --- compiler-rt/lib/builtins/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt index f0d3f50714c1..6b25c96ce305 100644 --- a/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt @@ -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