From 95177d1e71349cbb3dfa50c68a95e32041243488 Mon Sep 17 00:00:00 2001 From: kjellander Date: Thu, 7 Apr 2016 00:13:58 -0700 Subject: [PATCH] GN: Fix some build errors for iOS. With these changes, the only problem seem to be the missing jpeg library. See https://codereview.chromium.org/1806503002/ for more details on that. BUG=webrtc:5195, webrtc:5748 NOTRY=True Review URL: https://codereview.webrtc.org/1869523002 Cr-Commit-Position: refs/heads/master@{#12273} --- webrtc/modules/audio_device/BUILD.gn | 9 +++++++++ webrtc/test/BUILD.gn | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index f41501e7f8..198b67d520 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -14,6 +14,14 @@ config("audio_device_config") { "include", "dummy", # Contains dummy audio device implementations. ] + if (is_ios) { + # GN orders flags on a target before flags from configs. In order to be able + # suppress the -Wthread-safety-analysis warning, it has come from a config + # and can't be on the target directly. + # TODO(tkchin): Remove after fixing + # https://bugs.chromium.org/p/webrtc/issues/detail?id=5748 + cflags = [ "-Wno-thread-safety-analysis" ] + } } source_set("audio_device") { @@ -148,6 +156,7 @@ source_set("audio_device") { "ios/voice_processing_audio_unit.mm", ] cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES. + libs = [ "AudioToolbox.framework", "AVFoundation.framework", diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 54694b8b64..af9516f434 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -59,6 +59,7 @@ source_set("test_support") { "testsupport/frame_reader.h", "testsupport/frame_writer.cc", "testsupport/frame_writer.h", + "testsupport/iosfileutils.mm", "testsupport/mock/mock_frame_reader.h", "testsupport/mock/mock_frame_writer.h", "testsupport/packet_reader.cc", @@ -76,6 +77,10 @@ source_set("test_support") { "//testing/gtest", ] + if (is_ios) { + cflags = [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES. + } + if (is_android) { deps += [ "//base:base" ] }