From 67c20ae57100e5878e9734b1c8c53ebd5b5d7bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20H=C3=B6glund?= Date: Mon, 18 Dec 2017 11:21:14 +0100 Subject: [PATCH] Inlined audio_processing_neon_c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This solves a circular dep and eliminates a target. This means we will apply neon copts to some files that weren't before, but I don't think that is a problem. Bug: webrtc:6828,webrtc:7042 Change-Id: I3bb656ba5b13d6104b519c2dbf6a4b2814575b87 Reviewed-on: https://webrtc-review.googlesource.com/34183 Reviewed-by: Per Åhgren Commit-Queue: Patrik Höglund Cr-Commit-Position: refs/heads/master@{#21330} --- modules/audio_processing/BUILD.gn | 56 +++++++++++-------------------- 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index d8790760f9..21ba51def5 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -351,7 +351,24 @@ rtc_source_set("audio_processing_c") { ] if (rtc_build_with_neon) { - deps += [ ":audio_processing_neon_c" ] + sources += [ "ns/nsx_core_neon.c" ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. This is needed + # since //build/config/arm.gni only enables NEON for iOS, not Android. + # This provides the same functionality as webrtc/build/arm_neon.gypi. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + + # Disable LTO on NEON targets due to compiler bug. + # TODO(fdegans): Enable this. See crbug.com/408997. + if (rtc_use_lto) { + cflags -= [ + "-flto", + "-ffat-lto-objects", + ] + } } } @@ -455,10 +472,7 @@ rtc_source_set("aec_core") { ] } - deps += [ - ":audio_processing_neon_c", - "../../common_audio", - ] + deps += [ "../../common_audio" ] } if (current_cpu == "mipsel") { @@ -482,38 +496,6 @@ rtc_source_set("aec_core") { configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] } -if (rtc_build_with_neon) { - rtc_static_library("audio_processing_neon_c") { - # TODO(mbonadei): Remove (bugs.webrtc.org/6828) - # Errors on cyclic dependency with :audio_processing_c if enabled. - check_includes = false - - sources = [ - "ns/nsx_core_neon.c", - ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. This is needed - # since //build/config/arm.gni only enables NEON for iOS, not Android. - # This provides the same functionality as webrtc/build/arm_neon.gypi. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - - # Disable LTO on NEON targets due to compiler bug. - # TODO(fdegans): Enable this. See crbug.com/408997. - if (rtc_use_lto) { - cflags -= [ - "-flto", - "-ffat-lto-objects", - ] - } - deps = [ - "../../rtc_base:rtc_base_approved", - ] - } -} - if (rtc_include_tests) { group("audio_processing_tests") { testonly = true