This takes the rest of the .cc files out of the rtc_p2p build
target, leaving only one entangled target to clean up.
Bug: webrtc:15796
Change-Id: I4312b70ffe96a8affc1a02456ac466eea05dd44c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338220
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41676}
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.
Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.
Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed
Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
Instead of creating a TaskQueue from packet_sender, create a rtc::Thread
in test_controller so that test_controller instantiates a SocketServer,
eliminating the use of rtc::Thread::socketserver().
Also did various cleanups, such as adding threading annotations, and
ensuring that all network operations are done in dedicated threads.
Bug: webrtc:13145
Test: Unittest, and manually verified using Android clients and Linux servers
Change-Id: I05ebe5e29bd80f14a193c9ee8b0bf63a1b6b94d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263321
Commit-Queue: Daniel.l Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37411}
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.
Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
In callers where it's non-trivial to explicitly pass the right
SocketFactory, pull the call to rtc::Thread::socketserver() into the
caller, with a TODO comment.
Bug: webrtc:13145
Change-Id: I029d3adca385d822180e089f016c3778e0d4fd0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231227
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35063}
This is a reland of 69241a93fb
Fix: The problem was related to NO_MAIN_THREAD_WRAPPING, which
affects https://source.chromium.org/chromium/chromium/src/+/master:third_party/webrtc/rtc_base/thread.cc;l=257-263;drc=7acc2d9fe3a6e3c4d8881d2bdfc9b8968a724cd5.
The original CL didn't attach the definition of the macro
NO_MAIN_THREAD_WRAPPING when building for Chromium (which doesn't have
to be related to //rtc_base anymore but to //rtc_base:threading).
Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
> break a circular dependency (is has been extracted from
> //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
> break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}
Bug: webrtc:9987
Change-Id: I7cdf49d2aac8357f1f50f90010bf2c2f62fa19f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202021
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33001}
This reverts commit 69241a93fb.
Reason for revert: Breaks WebRTC roll into Chromium.
Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
> break a circular dependency (is has been extracted from
> //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
> break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}
TBR=mbonadei@webrtc.org,hta@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
No-Try: True
Bug: webrtc:9987
Change-Id: I1e36ad64cc60092f38d6886153a94f1a58339256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201840
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32986}
The "//rtc_base:rtc_base" build target has historically been one of the
biggest targets in the WebRTC build. Big targets are the main source of
circular dependencies and non-API types leakage.
This CL is a step forward into splitting "//rtc_base:rtc_base" into
smaller targets (as originally started in 2018).
The only non-automated changes are (like re-wiring the build system):
* The creation of //rtc_base/async_resolver.{h,cc} which allows to
break a circular dependency (is has been extracted from
//rtc_base/net_helpers.{h,cc}).
* The creation of //rtc_base/internal/default_socket_server.{h,cc} to
break another circular dependency.
Bug: webrtc:9987
Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32941}
This is a reland of f5e261aaf6
This CL disables RTC_NO_UNIQUE_ADDRESS on MSan builds since
there have been some issues.
Original change's description:
> Introduce RTC_NO_UNIQUE_ADDRESS.
>
> This macro introduces the possibility to suggest the compiler that a
> data member doesn't need an address different from other non static
> data members.
>
> The usage of a macro is to maintain portability since at the moment
> the attribute [[no_unique_address]] is only supported by clang
> with at least -std=c++11 but it should be supported by all the
> compilers starting from C++20.
>
> Bug: webrtc:11495
> Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32246}
Bug: webrtc:11495, webrtc:12218
Change-Id: I4e6c7cc37d3daffad2407c9a2acfa897fa5b426a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189968
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32668}
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.
This CL moves all these files one step closer to what the linter
wants.
Autogenerated with:
# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full
This is part 1 out of 2. The second part will fix function names and
will not be automated.
[1] - https://webrtc-review.googlesource.com/c/src/+/186664
No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
This reverts commit f5e261aaf6.
Reason for revert: Breaks downstream projects.
Original change's description:
> Introduce RTC_NO_UNIQUE_ADDRESS.
>
> This macro introduces the possibility to suggest the compiler that a
> data member doesn't need an address different from other non static
> data members.
>
> The usage of a macro is to maintain portability since at the moment
> the attribute [[no_unique_address]] is only supported by clang
> with at least -std=c++11 but it should be supported by all the
> compilers starting from C++20.
>
> Bug: webrtc:11495
> Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32246}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:11495
Change-Id: Ice318d1b11ca3dff09c190187a0b0a32ca945fe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32335}
This macro introduces the possibility to suggest the compiler that a
data member doesn't need an address different from other non static
data members.
The usage of a macro is to maintain portability since at the moment
the attribute [[no_unique_address]] is only supported by clang
with at least -std=c++11 but it should be supported by all the
compilers starting from C++20.
Bug: webrtc:11495
Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32246}
`create_srcjar = false` was needed during the transition to moving
R.java generation to android_library targets. Now this variable is
unused (the variable is asserted to be false), clean up all references.
Bug: chromium:1073476
Change-Id: I4c09ea05ded27ea2360392aacbce036bc1a2f928
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#32178}
R.java file creation responsibilities will be moved to android_library
and android_apk targets and creating R.java files in the
android_resources targets is now deprecated. This cl migrates webrtc
targets to the new way.
Bug: chromium:1073476
Change-Id: I0a2fa759d3ff1d8e201e5719c9238701a58171e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183060
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32026}
Remove android_manifest_for_lint from BUILD.gn files
The Chromium Roll into WebRTC isn't flowing
The first CL that caused the problem is https://webrtc-review.googlesource.com/c/src/+/175140/
The error is: ERROR at //examples/BUILD.gn:104:33: Assignment had no effect. android_manifest_for_lint = "androidapp/AndroidManifest.xml"
android_manifest_for_lint has ben removed so update BUILD files that use that feature to reflect this.
BUG=None
Change-Id: If526d9a4dd80cddca7f2c9dd7f67ba9efe3f1a84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175661
Commit-Queue: Courtney Edwards <courtneyfe@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31325}
This reverts commit 340106ad46.
Reason for revert: Broke internal project.
Original change's description:
> Remove android_manifest_for_lint from BUILD.gn files
>
> The Chromium Roll into WebRTC isn't flowing
> The first CL that caused the problem is https://webrtc-review.googlesource.com/c/src/+/175140/
> The error is: ERROR at //examples/BUILD.gn:104:33: Assignment had no effect. android_manifest_for_lint = "androidapp/AndroidManifest.xml"
> android_manifest_for_lint has ben removed so update BUILD files that use that feature to reflect this.
>
> BUG=None
>
> Change-Id: Ic3eb16eab8e4a4ab87daac9998d7a07373fec493
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175569
> Commit-Queue: Courtney Edwards <courtneyfe@google.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31299}
TBR=mbonadei@webrtc.org,titovartem@webrtc.org,courtneyfe@google.com,courtneyfe@chromium.org
Change-Id: I6055b4363254d353d116805aac4ec63d7c5c7c59
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175622
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31303}
The Chromium Roll into WebRTC isn't flowing
The first CL that caused the problem is https://webrtc-review.googlesource.com/c/src/+/175140/
The error is: ERROR at //examples/BUILD.gn:104:33: Assignment had no effect. android_manifest_for_lint = "androidapp/AndroidManifest.xml"
android_manifest_for_lint has ben removed so update BUILD files that use that feature to reflect this.
BUG=None
Change-Id: Ic3eb16eab8e4a4ab87daac9998d7a07373fec493
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175569
Commit-Queue: Courtney Edwards <courtneyfe@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31299}
`gn format` recently [1] changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
CL generated with:
$ git ls-files | grep BUILD.gn | xargs gn format
$ gn format build_overrides/build.gni
$ gn format build_overrides/gtest.gni
$ gn format modules/audio_coding/audio_coding.gni
$ gn format webrtc.gni
$ gn format .gn
Plus a few manual changes to add exceptions for
"public_deps" (after changing these lines the presubmit
started to complain).
[1] - https://gn-review.googlesource.com/c/gn/+/6860
Bug: webrtc:11302
Change-Id: Iac29d23c1618ebef925c972e2891cd9f4e8cd613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166882
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30334}
Replace all usages of java_files with sources in gn files, and
automatically format.
This is in preparation for java_files being completely removed upstream
in favor of sources.
NOPRESUBMIT=true
Bug: chromium:1035074
Change-Id: Ib9a698740b7ad26a127031d90321c7ae2feb59bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163161
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Natalie Chouinard <chouinard@google.com>
Cr-Commit-Position: refs/heads/master@{#30135}
Since rtc_base/ignore_wundef.h doesn't have any dependency, it is easy to
move it to its own target and allow its dependant to avoid to take a
dependency rtc_base:on rtc_base_approved.
Bug: webrtc:9419
Change-Id: I17f205b0cb2b21cad388b04e60082df9398dffdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157428
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29548}
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).
Source sets always pass all the object files to the linker.
On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.
See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set
Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
In https://chromium-review.googlesource.com/1650265 attributes like minSdkVersion were moved from AndroidManifest.xml to GN files. For WebRTC there were a few problems with that.
* We don't want to suppress UsesMinSdkAttributes lint but now there are these "invalid" manifest files that we can't exclude or discern. So disable this lint error.
https://chromium-review.googlesource.com/c/chromium/src/+/1650265/14/build/android/AndroidManifest.xml
* We should specify the versions in GN files, so I did that here (by exactly copying the versions that are already in the targets' corresponding XML files), but we never want to get rid of them in the XML files. For now this information will just be duplicated (without any synchronicity check!) so there should be followup to this.
Change log: 6ae0f0cd4c..bf62d746a4
Full diff: 6ae0f0cd4c..bf62d746a4
Changed dependencies
* src/base: 9e5e9332df..e5a1d1f652
* src/build: 5a031748ec..2ef566e990
* src/buildtools: 6ae683be2f..6f3775ad6e
* src/buildtools/linux64: git_revision:8c7f49102234f4f4b9349dcb258554675475e596..git_revision:81ee1967d3fcbc829bac1c005c3da59739c88df9
* src/buildtools/mac: git_revision:8c7f49102234f4f4b9349dcb258554675475e596..git_revision:81ee1967d3fcbc829bac1c005c3da59739c88df9
* src/buildtools/win: git_revision:8c7f49102234f4f4b9349dcb258554675475e596..git_revision:81ee1967d3fcbc829bac1c005c3da59739c88df9
* src/ios: 2f5c817266..7f1a97d593
* src/testing: 1d4247de57..b1b36ff0d4
* src/third_party: 6f7cbf7c46..42e96c4074
* src/third_party/android_sdk/public: ki7EDQRAiZAUYlnTWR1XmI6cJTk65fJ-DNZUU1zrtS8C..xhyuoquVvBTcJelgRjMKZeoBVSQRjB7pLVJPt5C9saIC
* src/third_party/android_sdk/public: iIwhhDox5E-mHgwUhCz8JACWQCpUjdqt5KTY9VLugKQC..ppQ4TnqDvBHQ3lXx5KPq97egzF5X2FFyOrVHkGmiTMQC
* src/third_party/android_sdk/public: 4Y2Cb2LGzoc-qt-oIUIlhySotJaKeE3ELFedSVe6Uk8C..MSnxgXN7IurL-MQs1RrTkSFSb8Xd1UtZjLArI8Ty1FgC
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/ed9fcf3f70..9e5dbd8b46
* src/tools: f58f33bca1..a9a4b8fc7b
DEPS diff: 6ae0f0cd4c..bf62d746a4/DEPS
No update to Clang.
Bug: chromium:891996
Change-Id: I773d6fa90e8083d934c84eecc1cb9d7d4496eca0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142235
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28311}