blob: 8250173afea3b5cd517e995d556ad98281d665e8 [file] [log] [blame]
Sam Zackrisson7219d052018-07-09 14:28:15 +02001# 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
9import("../../../webrtc.gni")
10
11rtc_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 = [
Sam Zackrisson7219d052018-07-09 14:28:15 +020020 "../../../common_audio:common_audio_c",
21 "../../../rtc_base:checks",
22 "../../../rtc_base:rtc_base_approved",
23 "../../../rtc_base:sanitizer",
24 "../../../system_wrappers:cpu_features_api",
25 "../utility:legacy_delay_estimator",
26 ]
27 cflags = []
28
29 if (rtc_build_with_neon) {
30 sources += [ "aecm_core_neon.cc" ]
31
32 if (current_cpu != "arm64") {
Oleh Prypind2f4e8b2018-08-01 12:18:05 +020033 # Enable compilation for the NEON instruction set.
Sam Zackrisson7219d052018-07-09 14:28:15 +020034 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
35 cflags += [ "-mfpu=neon" ]
36 }
37
38 # Disable LTO on NEON targets due to compiler bug.
39 # TODO(fdegans): Enable this. See crbug.com/408997.
40 if (rtc_use_lto) {
41 cflags -= [
42 "-flto",
43 "-ffat-lto-objects",
44 ]
45 }
46 }
47
48 if (current_cpu == "mipsel") {
49 sources += [ "aecm_core_mips.cc" ]
50 } else {
51 sources += [ "aecm_core_c.cc" ]
52 }
53}