| OLD | NEW |
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
| 10 import("../build/webrtc.gni") | 10 import("../build/webrtc.gni") |
| 11 import("//testing/test.gni") | |
| 12 | 11 |
| 13 config("common_audio_config") { | 12 config("common_audio_config") { |
| 14 include_dirs = [ | 13 include_dirs = [ |
| 15 "resampler/include", | 14 "resampler/include", |
| 16 "signal_processing/include", | 15 "signal_processing/include", |
| 17 "vad/include", | 16 "vad/include", |
| 18 ] | 17 ] |
| 19 } | 18 } |
| 20 | 19 |
| 21 source_set("common_audio") { | 20 rtc_source_set("common_audio") { |
| 22 sources = [ | 21 sources = [ |
| 23 "audio_converter.cc", | 22 "audio_converter.cc", |
| 24 "audio_converter.h", | 23 "audio_converter.h", |
| 25 "audio_ring_buffer.cc", | 24 "audio_ring_buffer.cc", |
| 26 "audio_ring_buffer.h", | 25 "audio_ring_buffer.h", |
| 27 "audio_util.cc", | 26 "audio_util.cc", |
| 28 "blocker.cc", | 27 "blocker.cc", |
| 29 "blocker.h", | 28 "blocker.h", |
| 30 "channel_buffer.cc", | 29 "channel_buffer.cc", |
| 31 "channel_buffer.h", | 30 "channel_buffer.h", |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 configs += [ "..:common_config" ] | 175 configs += [ "..:common_config" ] |
| 177 | 176 |
| 178 public_configs = [ | 177 public_configs = [ |
| 179 "..:common_inherited_config", | 178 "..:common_inherited_config", |
| 180 ":common_audio_config", | 179 ":common_audio_config", |
| 181 ] | 180 ] |
| 182 | 181 |
| 183 if (is_clang) { | 182 if (is_clang) { |
| 184 # Suppress warnings from Chrome's Clang plugins. | 183 # Suppress warnings from Chrome's Clang plugins. |
| 185 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 184 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 186 configs -= [ "//build/config/clang:find_bad_constructs" ] | 185 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 187 } | 186 } |
| 188 | 187 |
| 189 if (current_cpu == "x86" || current_cpu == "x64") { | 188 if (current_cpu == "x86" || current_cpu == "x64") { |
| 190 deps += [ ":common_audio_sse2" ] | 189 deps += [ ":common_audio_sse2" ] |
| 191 } | 190 } |
| 192 } | 191 } |
| 193 | 192 |
| 194 if (current_cpu == "x86" || current_cpu == "x64") { | 193 if (current_cpu == "x86" || current_cpu == "x64") { |
| 195 source_set("common_audio_sse2") { | 194 rtc_source_set("common_audio_sse2") { |
| 196 sources = [ | 195 sources = [ |
| 197 "fir_filter_sse.cc", | 196 "fir_filter_sse.cc", |
| 198 "resampler/sinc_resampler_sse.cc", | 197 "resampler/sinc_resampler_sse.cc", |
| 199 ] | 198 ] |
| 200 | 199 |
| 201 if (is_posix) { | 200 if (is_posix) { |
| 202 cflags = [ "-msse2" ] | 201 cflags = [ "-msse2" ] |
| 203 } | 202 } |
| 204 | 203 |
| 205 configs += [ "..:common_inherited_config" ] | 204 configs += [ "..:common_inherited_config" ] |
| 206 | 205 |
| 207 if (is_clang) { | 206 if (is_clang) { |
| 208 # Suppress warnings from Chrome's Clang plugins. | 207 # Suppress warnings from Chrome's Clang plugins. |
| 209 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 208 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 210 configs -= [ "//build/config/clang:find_bad_constructs" ] | 209 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 211 } | 210 } |
| 212 } | 211 } |
| 213 } | 212 } |
| 214 | 213 |
| 215 if (rtc_build_with_neon) { | 214 if (rtc_build_with_neon) { |
| 216 source_set("common_audio_neon") { | 215 rtc_source_set("common_audio_neon") { |
| 217 sources = [ | 216 sources = [ |
| 218 "fir_filter_neon.cc", | 217 "fir_filter_neon.cc", |
| 219 "resampler/sinc_resampler_neon.cc", | 218 "resampler/sinc_resampler_neon.cc", |
| 220 "signal_processing/cross_correlation_neon.c", | 219 "signal_processing/cross_correlation_neon.c", |
| 221 "signal_processing/downsample_fast_neon.c", | 220 "signal_processing/downsample_fast_neon.c", |
| 222 "signal_processing/min_max_operations_neon.c", | 221 "signal_processing/min_max_operations_neon.c", |
| 223 ] | 222 ] |
| 224 | 223 |
| 225 if (current_cpu != "arm64") { | 224 if (current_cpu != "arm64") { |
| 226 # Enable compilation for the NEON instruction set. This is needed | 225 # Enable compilation for the NEON instruction set. This is needed |
| 227 # since //build/config/arm.gni only enables NEON for iOS, not Android. | 226 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 228 # This provides the same functionality as webrtc/build/arm_neon.gypi. | 227 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 229 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 228 configs_suppressions += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 230 cflags = [ "-mfpu=neon" ] | 229 cflags = [ "-mfpu=neon" ] |
| 231 } | 230 } |
| 232 | 231 |
| 233 # Disable LTO on NEON targets due to compiler bug. | 232 # Disable LTO on NEON targets due to compiler bug. |
| 234 # TODO(fdegans): Enable this. See crbug.com/408997. | 233 # TODO(fdegans): Enable this. See crbug.com/408997. |
| 235 if (rtc_use_lto) { | 234 if (rtc_use_lto) { |
| 236 cflags -= [ | 235 cflags -= [ |
| 237 "-flto", | 236 "-flto", |
| 238 "-ffat-lto-objects", | 237 "-ffat-lto-objects", |
| 239 ] | 238 ] |
| 240 } | 239 } |
| 241 | 240 |
| 242 configs += [ "..:common_config" ] | 241 configs += [ "..:common_config" ] |
| 243 public_configs = [ "..:common_inherited_config" ] | 242 public_configs = [ "..:common_inherited_config" ] |
| 244 | 243 |
| 245 if (is_clang) { | 244 if (is_clang) { |
| 246 # Suppress warnings from Chrome's Clang plugins. | 245 # Suppress warnings from Chrome's Clang plugins. |
| 247 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 246 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 248 configs -= [ "//build/config/clang:find_bad_constructs" ] | 247 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 249 } | 248 } |
| 250 } | 249 } |
| 251 } | 250 } |
| 252 | 251 |
| 253 if (rtc_include_tests) { | 252 if (rtc_include_tests) { |
| 254 test("common_audio_unittests") { | 253 rtc_test("common_audio_unittests") { |
| 255 testonly = true | 254 testonly = true |
| 256 | 255 |
| 257 sources = [ | 256 sources = [ |
| 258 "audio_converter_unittest.cc", | 257 "audio_converter_unittest.cc", |
| 259 "audio_ring_buffer_unittest.cc", | 258 "audio_ring_buffer_unittest.cc", |
| 260 "audio_util_unittest.cc", | 259 "audio_util_unittest.cc", |
| 261 "blocker_unittest.cc", | 260 "blocker_unittest.cc", |
| 262 "channel_buffer_unittest.cc", | 261 "channel_buffer_unittest.cc", |
| 263 "fir_filter_unittest.cc", | 262 "fir_filter_unittest.cc", |
| 264 "lapped_transform_unittest.cc", | 263 "lapped_transform_unittest.cc", |
| (...skipping 26 matching lines...) Expand all Loading... |
| 291 configs += [ "..:common_config" ] | 290 configs += [ "..:common_config" ] |
| 292 public_configs = [ "..:common_inherited_config" ] | 291 public_configs = [ "..:common_inherited_config" ] |
| 293 | 292 |
| 294 if (rtc_use_openmax_dl) { | 293 if (rtc_use_openmax_dl) { |
| 295 defines = [ "RTC_USE_OPENMAX_DL" ] | 294 defines = [ "RTC_USE_OPENMAX_DL" ] |
| 296 } | 295 } |
| 297 | 296 |
| 298 if (is_clang) { | 297 if (is_clang) { |
| 299 # Suppress warnings from the Chromium Clang plugin. | 298 # Suppress warnings from the Chromium Clang plugin. |
| 300 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 299 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 301 configs -= [ "//build/config/clang:find_bad_constructs" ] | 300 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 302 } | 301 } |
| 303 | 302 |
| 304 deps = [ | 303 deps = [ |
| 305 ":common_audio", | 304 ":common_audio", |
| 306 "../test:test_support_main", | 305 "../test:test_support_main", |
| 307 "//testing/gmock", | 306 "//testing/gmock", |
| 308 "//testing/gtest", | 307 "//testing/gtest", |
| 309 ] | 308 ] |
| 310 | 309 |
| 311 if (is_android) { | 310 if (is_android) { |
| 312 deps += [ "//testing/android/native_test:native_test_support" ] | 311 deps += [ "//testing/android/native_test:native_test_support" ] |
| 313 | 312 |
| 314 shard_timeout = 900 | 313 shard_timeout = 900 |
| 315 } | 314 } |
| 316 } | 315 } |
| 317 } | 316 } |
| OLD | NEW |