diff --git a/BUILD.gn b/BUILD.gn index e290a6e0d4..3ad9c97c31 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -356,10 +356,14 @@ config("common_config") { } if (is_clang) { - cflags += [ - "-Wc++11-narrowing", - "-Wundef", - ] + cflags += [ "-Wc++11-narrowing" ] + + if (!is_fuchsia) { + # Compiling with the Fuchsia SDK results in Wundef errors + # TODO(bugs.fuchsia.dev/100722): Remove from (!is_fuchsia) branch when + # Fuchsia build errors are fixed. + cflags += [ "-Wundef" ] + } if (!is_nacl) { # Flags NaCl (Clang 3.7) do not recognize. diff --git a/DEPS b/DEPS index e8120aefd5..6c97f735d9 100644 --- a/DEPS +++ b/DEPS @@ -2255,6 +2255,17 @@ hooks = [ 'condition': 'checkout_mac', 'action': ['python3', 'src/build/mac_toolchain.py'], }, + { + # Update the Fuchsia SDK if necessary. + 'name': 'Download Fuchsia SDK', + 'pattern': '.', + 'condition': 'checkout_fuchsia', + 'action': [ + 'python3', + 'src/build/fuchsia/update_sdk.py', + '--default-bucket=fuchsia', + ], + }, { # Note: On Win, this should run after win_toolchain, as it may use it. 'name': 'clang', diff --git a/modules/audio_coding/neteq/tools/rtp_encode.cc b/modules/audio_coding/neteq/tools/rtp_encode.cc index ee392f26a3..6aeeb6d129 100644 --- a/modules/audio_coding/neteq/tools/rtp_encode.cc +++ b/modules/audio_coding/neteq/tools/rtp_encode.cc @@ -13,7 +13,7 @@ #ifdef WIN32 #include #endif -#ifdef WEBRTC_LINUX +#if defined(WEBRTC_LINUX) || defined(WEBRTC_FUCHSIA) #include #endif diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn index 616be5d53f..ad2d85e3fe 100644 --- a/modules/video_capture/BUILD.gn +++ b/modules/video_capture/BUILD.gn @@ -102,6 +102,9 @@ if (!build_with_chromium) { ] } } + if (is_fuchsia) { + sources = [ "video_capture_factory_null.cc" ] + } if (build_with_mozilla && is_android) { include_dirs = [ diff --git a/modules/video_capture/video_capture_factory_null.cc b/modules/video_capture/video_capture_factory_null.cc new file mode 100644 index 0000000000..7808d19851 --- /dev/null +++ b/modules/video_capture/video_capture_factory_null.cc @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "modules/video_capture/video_capture_impl.h" + +namespace webrtc { +namespace videocapturemodule { + +// static +VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() { + return nullptr; +} + +rtc::scoped_refptr VideoCaptureImpl::Create( + const char* device_id) { + return nullptr; +} + +} // namespace videocapturemodule +} // namespace webrtc