Sam Zackrisson | 7219d05 | 2018-07-09 14:28:15 +0200 | [diff] [blame^] | 1 | # Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | import("../../../webrtc.gni") |
| 10 | |
| 11 | rtc_source_set("aecm_core") { |
| 12 | sources = [ |
| 13 | "aecm_core.cc", |
| 14 | "aecm_core.h", |
| 15 | "aecm_defines.h", |
| 16 | "echo_control_mobile.cc", |
| 17 | "echo_control_mobile.h", |
| 18 | ] |
| 19 | deps = [ |
| 20 | "../../..:typedefs", |
| 21 | "../../../common_audio:common_audio_c", |
| 22 | "../../../rtc_base:checks", |
| 23 | "../../../rtc_base:rtc_base_approved", |
| 24 | "../../../rtc_base:sanitizer", |
| 25 | "../../../system_wrappers:cpu_features_api", |
| 26 | "../utility:legacy_delay_estimator", |
| 27 | ] |
| 28 | cflags = [] |
| 29 | |
| 30 | if (rtc_build_with_neon) { |
| 31 | sources += [ "aecm_core_neon.cc" ] |
| 32 | |
| 33 | if (current_cpu != "arm64") { |
| 34 | # Enable compilation for the NEON instruction set. This is needed |
| 35 | # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 36 | # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 37 | suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 38 | cflags += [ "-mfpu=neon" ] |
| 39 | } |
| 40 | |
| 41 | # Disable LTO on NEON targets due to compiler bug. |
| 42 | # TODO(fdegans): Enable this. See crbug.com/408997. |
| 43 | if (rtc_use_lto) { |
| 44 | cflags -= [ |
| 45 | "-flto", |
| 46 | "-ffat-lto-objects", |
| 47 | ] |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | if (current_cpu == "mipsel") { |
| 52 | sources += [ "aecm_core_mips.cc" ] |
| 53 | } else { |
| 54 | sources += [ "aecm_core_c.cc" ] |
| 55 | } |
| 56 | } |