Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: webrtc/modules/audio_processing/BUILD.gn

Issue 2301053002: GN: Introduce templates. (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_mixer/BUILD.gn ('k') | webrtc/modules/bitrate_controller/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//third_party/protobuf/proto_library.gni") 10 import("//third_party/protobuf/proto_library.gni")
11 import("../../build/webrtc.gni") 11 import("../../build/webrtc.gni")
12 12
13 declare_args() { 13 declare_args() {
14 # Disables the usual mode where we trust the reported system delay 14 # Disables the usual mode where we trust the reported system delay
15 # values the AEC receives. The corresponding define is set appropriately 15 # values the AEC receives. The corresponding define is set appropriately
16 # in the code, but it can be force-enabled here for testing. 16 # in the code, but it can be force-enabled here for testing.
17 aec_untrusted_delay_for_testing = false 17 aec_untrusted_delay_for_testing = false
18 } 18 }
19 19
20 source_set("audio_processing") { 20 rtc_source_set("audio_processing") {
21 sources = [ 21 sources = [
22 "aec/aec_core.cc", 22 "aec/aec_core.cc",
23 "aec/aec_core.h", 23 "aec/aec_core.h",
24 "aec/aec_core_optimized_methods.h", 24 "aec/aec_core_optimized_methods.h",
25 "aec/aec_rdft.cc", 25 "aec/aec_rdft.cc",
26 "aec/aec_rdft.h", 26 "aec/aec_rdft.h",
27 "aec/aec_resampler.cc", 27 "aec/aec_resampler.cc",
28 "aec/aec_resampler.h", 28 "aec/aec_resampler.h",
29 "aec/echo_cancellation.cc", 29 "aec/echo_cancellation.cc",
30 "aec/echo_cancellation.h", 30 "aec/echo_cancellation.h",
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 proto_library("audioproc_debug_proto") { 247 proto_library("audioproc_debug_proto") {
248 sources = [ 248 sources = [
249 "debug.proto", 249 "debug.proto",
250 ] 250 ]
251 251
252 proto_out_dir = "webrtc/modules/audio_processing" 252 proto_out_dir = "webrtc/modules/audio_processing"
253 } 253 }
254 } 254 }
255 255
256 if (current_cpu == "x86" || current_cpu == "x64") { 256 if (current_cpu == "x86" || current_cpu == "x64") {
257 source_set("audio_processing_sse2") { 257 rtc_source_set("audio_processing_sse2") {
258 sources = [ 258 sources = [
259 "aec/aec_core_sse2.cc", 259 "aec/aec_core_sse2.cc",
260 "aec/aec_rdft_sse2.cc", 260 "aec/aec_rdft_sse2.cc",
261 ] 261 ]
262 262
263 if (is_posix) { 263 if (is_posix) {
264 cflags = [ "-msse2" ] 264 cflags = [ "-msse2" ]
265 } 265 }
266 266
267 configs += [ "../..:common_config" ] 267 configs += [ "../..:common_config" ]
268 public_configs = [ "../..:common_inherited_config" ] 268 public_configs = [ "../..:common_inherited_config" ]
269 269
270 if (apm_debug_dump) { 270 if (apm_debug_dump) {
271 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] 271 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
272 } else { 272 } else {
273 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] 273 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
274 } 274 }
275 } 275 }
276 } 276 }
277 277
278 if (rtc_build_with_neon) { 278 if (rtc_build_with_neon) {
279 source_set("audio_processing_neon") { 279 rtc_source_set("audio_processing_neon") {
280 sources = [ 280 sources = [
281 "aec/aec_core_neon.cc", 281 "aec/aec_core_neon.cc",
282 "aec/aec_rdft_neon.cc", 282 "aec/aec_rdft_neon.cc",
283 "aecm/aecm_core_neon.cc", 283 "aecm/aecm_core_neon.cc",
284 "ns/nsx_core_neon.c", 284 "ns/nsx_core_neon.c",
285 ] 285 ]
286 286
287 if (current_cpu != "arm64") { 287 if (current_cpu != "arm64") {
288 # Enable compilation for the NEON instruction set. This is needed 288 # Enable compilation for the NEON instruction set. This is needed
289 # since //build/config/arm.gni only enables NEON for iOS, not Android. 289 # since //build/config/arm.gni only enables NEON for iOS, not Android.
290 # This provides the same functionality as webrtc/build/arm_neon.gypi. 290 # This provides the same functionality as webrtc/build/arm_neon.gypi.
291 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 291 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
292 cflags = [ "-mfpu=neon" ] 292 cflags = [ "-mfpu=neon" ]
293 } 293 }
294 294
295 # Disable LTO on NEON targets due to compiler bug. 295 # Disable LTO on NEON targets due to compiler bug.
296 # TODO(fdegans): Enable this. See crbug.com/408997. 296 # TODO(fdegans): Enable this. See crbug.com/408997.
297 if (rtc_use_lto) { 297 if (rtc_use_lto) {
298 cflags -= [ 298 cflags -= [
299 "-flto", 299 "-flto",
300 "-ffat-lto-objects", 300 "-ffat-lto-objects",
301 ] 301 ]
302 } 302 }
303 303
304 configs += [ "../..:common_config" ] 304 configs += [ "../..:common_config" ]
305 public_configs = [ "../..:common_inherited_config" ] 305 public_configs = [ "../..:common_inherited_config" ]
306 306
307 deps = [ 307 deps = [
308 "../../common_audio", 308 "../../common_audio",
309 ] 309 ]
310 310
311 if (apm_debug_dump) { 311 if (apm_debug_dump) {
312 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] 312 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
313 } else { 313 } else {
314 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] 314 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
315 } 315 }
316 } 316 }
317 } 317 }
318 318
319 if (rtc_include_tests) { 319 if (rtc_include_tests) {
320 executable("audioproc") { 320 rtc_executable("audioproc") {
321 testonly = true 321 testonly = true
322 sources = [ 322 sources = [
323 "test/process_test.cc", 323 "test/process_test.cc",
324 ] 324 ]
325 325
326 configs += [ "../..:common_config" ] 326 configs += [ "../..:common_config" ]
327 public_configs = [ "../..:common_inherited_config" ] 327 public_configs = [ "../..:common_inherited_config" ]
328 328
329 deps = [ 329 deps = [
330 ":audio_processing", 330 ":audio_processing",
331 ":audioproc_debug_proto", 331 ":audioproc_debug_proto",
332 ":audioproc_protobuf_utils", 332 ":audioproc_protobuf_utils",
333 ":audioproc_test_utils", 333 ":audioproc_test_utils",
334 "../../system_wrappers", 334 "../../system_wrappers",
335 "../../system_wrappers:system_wrappers_default", 335 "../../system_wrappers:system_wrappers_default",
336 "../../test:test_support", 336 "../../test:test_support",
337 "//build/config/sanitizers:deps", 337 "//build/config/sanitizers:deps",
338 "//testing/gtest", 338 "//testing/gtest",
339 "//third_party/gflags:gflags", 339 "//third_party/gflags:gflags",
340 ] 340 ]
341 } # audioproc 341 } # audioproc
342 342
343 executable("unpack_aecdump") { 343 rtc_executable("unpack_aecdump") {
344 testonly = true 344 testonly = true
345 sources = [ 345 sources = [
346 "test/unpack.cc", 346 "test/unpack.cc",
347 ] 347 ]
348 348
349 configs += [ "../..:common_config" ] 349 configs += [ "../..:common_config" ]
350 public_configs = [ "../..:common_inherited_config" ] 350 public_configs = [ "../..:common_inherited_config" ]
351 351
352 deps = [ 352 deps = [
353 ":audio_processing", 353 ":audio_processing",
354 ":audioproc_debug_proto", 354 ":audioproc_debug_proto",
355 ":audioproc_protobuf_utils", 355 ":audioproc_protobuf_utils",
356 ":audioproc_test_utils", 356 ":audioproc_test_utils",
357 "../../common_audio", 357 "../../common_audio",
358 "../../system_wrappers:system_wrappers_default", 358 "../../system_wrappers:system_wrappers_default",
359 "//build/config/sanitizers:deps", 359 "//build/config/sanitizers:deps",
360 "//third_party/gflags:gflags", 360 "//third_party/gflags:gflags",
361 ] 361 ]
362 } # unpack_aecdump 362 } # unpack_aecdump
363 363
364 executable("audioproc_f") { 364 rtc_executable("audioproc_f") {
365 testonly = true 365 testonly = true
366 sources = [ 366 sources = [
367 "test/aec_dump_based_simulator.cc", 367 "test/aec_dump_based_simulator.cc",
368 "test/aec_dump_based_simulator.h", 368 "test/aec_dump_based_simulator.h",
369 "test/audio_processing_simulator.cc", 369 "test/audio_processing_simulator.cc",
370 "test/audio_processing_simulator.h", 370 "test/audio_processing_simulator.h",
371 "test/audioproc_float.cc", 371 "test/audioproc_float.cc",
372 "test/wav_based_simulator.cc", 372 "test/wav_based_simulator.cc",
373 "test/wav_based_simulator.h", 373 "test/wav_based_simulator.h",
374 ] 374 ]
375 375
376 configs += [ "../..:common_config" ] 376 configs += [ "../..:common_config" ]
377 public_configs = [ "../..:common_inherited_config" ] 377 public_configs = [ "../..:common_inherited_config" ]
378 378
379 deps = [ 379 deps = [
380 ":audio_processing", 380 ":audio_processing",
381 ":audioproc_debug_proto", 381 ":audioproc_debug_proto",
382 ":audioproc_protobuf_utils", 382 ":audioproc_protobuf_utils",
383 ":audioproc_test_utils", 383 ":audioproc_test_utils",
384 "../../system_wrappers", 384 "../../system_wrappers",
385 "../../system_wrappers:system_wrappers_default", 385 "../../system_wrappers:system_wrappers_default",
386 "../../test:test_support", 386 "../../test:test_support",
387 "//build/config/sanitizers:deps", 387 "//build/config/sanitizers:deps",
388 "//testing/gtest", 388 "//testing/gtest",
389 "//third_party/gflags:gflags", 389 "//third_party/gflags:gflags",
390 ] 390 ]
391 } # audioproc_f 391 } # audioproc_f
392 392
393 source_set("audioproc_test_utils") { 393 rtc_source_set("audioproc_test_utils") {
394 testonly = true 394 testonly = true
395 sources = [ 395 sources = [
396 "test/audio_buffer_tools.cc", 396 "test/audio_buffer_tools.cc",
397 "test/audio_buffer_tools.h", 397 "test/audio_buffer_tools.h",
398 "test/test_utils.cc", 398 "test/test_utils.cc",
399 "test/test_utils.h", 399 "test/test_utils.h",
400 ] 400 ]
401 401
402 configs += [ "../..:common_config" ] 402 configs += [ "../..:common_config" ]
403 public_configs = [ "../..:common_inherited_config" ] 403 public_configs = [ "../..:common_inherited_config" ]
404 404
405 deps = [ 405 deps = [
406 "../../base:rtc_base_approved", 406 "../../base:rtc_base_approved",
407 "../../common_audio", 407 "../../common_audio",
408 ] 408 ]
409 } 409 }
410 410
411 executable("transient_suppression_test") { 411 rtc_executable("transient_suppression_test") {
412 testonly = true 412 testonly = true
413 sources = [ 413 sources = [
414 "transient/file_utils.cc", 414 "transient/file_utils.cc",
415 "transient/file_utils.h", 415 "transient/file_utils.h",
416 "transient/transient_suppression_test.cc", 416 "transient/transient_suppression_test.cc",
417 ] 417 ]
418 deps = [ 418 deps = [
419 ":audio_processing", 419 ":audio_processing",
420 "../../system_wrappers:metrics_default", 420 "../../system_wrappers:metrics_default",
421 "../../test:test_support", 421 "../../test:test_support",
422 "//testing/gtest", 422 "//testing/gtest",
423 "//third_party/gflags", 423 "//third_party/gflags",
424 ] 424 ]
425 } 425 }
426 426
427 executable("click_annotate") { 427 rtc_executable("click_annotate") {
428 testonly = true 428 testonly = true
429 sources = [ 429 sources = [
430 "transient/click_annotate.cc", 430 "transient/click_annotate.cc",
431 "transient/file_utils.cc", 431 "transient/file_utils.cc",
432 "transient/file_utils.h", 432 "transient/file_utils.h",
433 ] 433 ]
434 deps = [ 434 deps = [
435 ":audio_processing", 435 ":audio_processing",
436 "../../system_wrappers:metrics_default", 436 "../../system_wrappers:metrics_default",
437 ] 437 ]
438 } 438 }
439 439
440 executable("nonlinear_beamformer_test") { 440 rtc_executable("nonlinear_beamformer_test") {
441 testonly = true 441 testonly = true
442 sources = [ 442 sources = [
443 "beamformer/nonlinear_beamformer_test.cc", 443 "beamformer/nonlinear_beamformer_test.cc",
444 ] 444 ]
445 deps = [ 445 deps = [
446 ":audio_processing", 446 ":audio_processing",
447 ":audioproc_test_utils", 447 ":audioproc_test_utils",
448 "../../system_wrappers:metrics_default", 448 "../../system_wrappers:metrics_default",
449 "//third_party/gflags", 449 "//third_party/gflags",
450 ] 450 ]
451 } 451 }
452 452
453 if (rtc_enable_intelligibility_enhancer) { 453 if (rtc_enable_intelligibility_enhancer) {
454 executable("intelligibility_proc") { 454 rtc_executable("intelligibility_proc") {
455 testonly = true 455 testonly = true
456 sources = [ 456 sources = [
457 "intelligibility/test/intelligibility_proc.cc", 457 "intelligibility/test/intelligibility_proc.cc",
458 ] 458 ]
459 deps = [ 459 deps = [
460 ":audio_processing", 460 ":audio_processing",
461 ":audioproc_test_utils", 461 ":audioproc_test_utils",
462 "../../system_wrappers:metrics_default", 462 "../../system_wrappers:metrics_default",
463 "../../test:test_support", 463 "../../test:test_support",
464 "//testing/gtest", 464 "//testing/gtest",
465 "//third_party/gflags", 465 "//third_party/gflags",
466 ] 466 ]
467 } 467 }
468 } 468 }
469 469
470 if (rtc_enable_protobuf) { 470 if (rtc_enable_protobuf) {
471 proto_library("audioproc_unittest_proto") { 471 proto_library("audioproc_unittest_proto") {
472 sources = [ 472 sources = [
473 "test/unittest.proto", 473 "test/unittest.proto",
474 ] 474 ]
475 proto_out_dir = "webrtc/modules/audio_processing" 475 proto_out_dir = "webrtc/modules/audio_processing"
476 } 476 }
477 477
478 source_set("audioproc_protobuf_utils") { 478 rtc_source_set("audioproc_protobuf_utils") {
479 sources = [ 479 sources = [
480 "test/protobuf_utils.cc", 480 "test/protobuf_utils.cc",
481 "test/protobuf_utils.h", 481 "test/protobuf_utils.h",
482 ] 482 ]
483 483
484 deps = [ 484 deps = [
485 ":audioproc_debug_proto", 485 ":audioproc_debug_proto",
486 ] 486 ]
487 } 487 }
488 } 488 }
489 } 489 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/BUILD.gn ('k') | webrtc/modules/bitrate_controller/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698