From 5d2bb36b95c2a89c4bdddb1ed613f9bcf8aa764e Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 20 Dec 2017 21:19:49 +0100 Subject: [PATCH] Fix linker error when building without internal audio device. Bug: webrtc:8678 Change-Id: I30f0d1aa7bec6931edb9e5ba00a6813dea1536ff Reviewed-on: https://webrtc-review.googlesource.com/35480 Reviewed-by: Henrik Andreassson Commit-Queue: Henrik Andreassson Cr-Commit-Position: refs/heads/master@{#21408} --- modules/audio_device/BUILD.gn | 3 +++ modules/audio_device/audio_device_unittest.cc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn index 38ce742f90..ef48180be9 100644 --- a/modules/audio_device/BUILD.gn +++ b/modules/audio_device/BUILD.gn @@ -364,6 +364,9 @@ if (rtc_include_tests) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } + if (!rtc_include_internal_audio_device) { + defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ] + } } } diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc index 60acbbce8c..11278c4c8d 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc @@ -455,7 +455,8 @@ class MockAudioTransport : public test::MockAudioTransport { class AudioDeviceTest : public ::testing::Test { protected: AudioDeviceTest() : event_(false, false) { -#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(WEBRTC_DUMMY_AUDIO_BUILD) rtc::LogMessage::LogToDebug(rtc::LS_INFO); // Add extra logging fields here if needed for debugging. // rtc::LogMessage::LogTimestamps();