gn build: Fix redundant object files in builtin lib.
authorNico Weber <nicolasweber@gmx.de>
Wed, 31 Jul 2019 17:08:34 +0000 (17:08 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 31 Jul 2019 17:08:34 +0000 (17:08 +0000)
commite4001bacc2c62e16b03ead066043228fea77a8d7
tree28f8e6a991bd7b74e3d4343c337c7cce6baf7e9c
parent435cdecdf721e39ec3b732f0affde970eadac525
gn build: Fix redundant object files in builtin lib.

compiler-rt's builtin library has generic implementations of many
functions, and then per-arch optimized implementations of some.

In the CMake build, both filter_builtin_sources() and an explicit loop
at the end of the build file (see D37166) filter out the generic
versions if a per-arch file is present.

The GN build wasn't doing this filtering. Just do the filtering manually
and explicitly, instead of being clever.

While here, also remove files from the mingw/arm build that are
redundantly listed after D39938 / r318139 (both from the CMake and the
GN build).

While here, also fix a target_os -> target_cpu typo.

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

llvm-svn: 367448
compiler-rt/lib/builtins/CMakeLists.txt
llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn