Commit graph

30 commits

Author SHA1 Message Date
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Mirko Bonadei
ccbe95fd8a Reformat GN files.
`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}
2020-01-21 12:13:11 +00:00
Mirko Bonadei
92dd35d035 Reland "Force Chromium deps on the WebRTC component."
This is a reland of 53e157d25c

The issue has been fixed in
https://chromium-review.googlesource.com/c/chromium/src/+/1917204.

Original change's description:
> Force Chromium deps on the WebRTC component.
>
> This CL adds a visibility check to the rtc_* GN templates in order
> to force Chromium to depend only on publicly visible targets from
> //third_party/webrtc_overrides and not from //third_party/webrtc.
>
> This is required in order to ensure that the Chromium's component
> builds continues to work correctly without introducing direct
> dependency paths on WebRTC that would statically link it in multiple
> shared libraries.
>
> Bug: webrtc:9419
> Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29806}

TBR: kwiberg@webrtc.org
Bug: webrtc:9419
Change-Id: I7123d1b44ddbc23b11d9fa25aa39aa420359e33d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159922
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29816}
2019-11-18 12:16:43 +00:00
Mirko Bonadei
2419dc9cfc Revert "Force Chromium deps on the WebRTC component."
This reverts commit 53e157d25c.

Reason for revert: Breaks Chromium iOS FYI bots.
https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/5088

Original change's description:
> Force Chromium deps on the WebRTC component.
>
> This CL adds a visibility check to the rtc_* GN templates in order
> to force Chromium to depend only on publicly visible targets from
> //third_party/webrtc_overrides and not from //third_party/webrtc.
>
> This is required in order to ensure that the Chromium's component
> builds continues to work correctly without introducing direct
> dependency paths on WebRTC that would statically link it in multiple
> shared libraries.
>
> Bug: webrtc:9419
> Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29806}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,dpranke@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR: kwiberg@webrtc.org
Bug: webrtc:9419
Change-Id: Id4d906910d569a3e5db3afef8c03672fba6dad81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159921
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29813}
2019-11-18 08:11:30 +00:00
Mirko Bonadei
53e157d25c Force Chromium deps on the WebRTC component.
This CL adds a visibility check to the rtc_* GN templates in order
to force Chromium to depend only on publicly visible targets from
//third_party/webrtc_overrides and not from //third_party/webrtc.

This is required in order to ensure that the Chromium's component
builds continues to work correctly without introducing direct
dependency paths on WebRTC that would statically link it in multiple
shared libraries.

Bug: webrtc:9419
Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29806}
2019-11-15 16:36:28 +00:00
Mirko Bonadei
d4002a733d RTC_EXPORT missing symbols for Chromium's component build.
This CL adds a dependecy on rtc_base/system:rtc_export to rtc_event but
only when built as part of Chromium (since rtc::Event should not be
used outside of WebRTC).

It also adds other missing RTC_EXPORTS.

Bug: webrtc:9419
Change-Id: Ib338004a5404a6b3c7929e146c29ad42572632cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159692
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29781}
2019-11-12 21:50:01 +00:00
Mirko Bonadei
c04792ebef Component Build support for api/task_queue:task_queue_test.
Chromium tests depend on api/task_queue:task_queue_test but it
cannot be added to the WebRTC component in Chromium (which is not
testonly).

A possible solution is to make api/task_queue:task_queue_test
depend on the WebRTC component which lives in Chromium only
when `build_with_chromium=true`.

Bug: webrtc:9419
Change-Id: I1cbe1fb97f21ef7a201d09d2f0f729104d01ed90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157427
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29578}
2019-10-22 23:21:06 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
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}
2019-10-17 21:17:18 +00:00
Danil Chapovalov
41300af876 Poison default task queue factory
Users of webrtc generally should be able to choose own task queue implementation.
Poison avoids accidental dependency of a low level component on the default implementation
Android and ios apis are still de-facto forced to use the default implementation.

Bug: webrtc:10284
Change-Id: I67ecf2317f43ee32b0c9e8a6e69f1e0987cf1914
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144786
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28524}
2019-07-10 14:08:20 +00:00
Danil Chapovalov
b249c54209 Delete GlobalTaskQueueFactory as now unused
Bug: webrtc:10284
Change-Id: I80fd75b0bd306a26e0c022047551587ee5fd08cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144781
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28516}
2019-07-09 14:45:47 +00:00
Danil Chapovalov
f504dd305d Rewrite TaskQueueTest.PostALot
avoid waiting while executing a Task to discourage blocking.

fix accessing tasks_clean_up counter since after TaskQueue is destroyed,
it doesn't guarantee sequential execution of the destructors, nor
that all pending tasks are destroyed at that moment.
Instead verify that all posted tasks will be destroyed eventually.

Bug: None
Change-Id: I4cfc97ac0787fe2d0b9d2f0d712a37ae0ca9e1aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140288
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28208}
2019-06-10 11:00:44 +00:00
Danil Chapovalov
4f779c6aec Remove legacy empty task_queue BUILD targets and build arg
Now that they are unused

Bug: webrtc:10191
Change-Id: Id5f1b70ed8e084555ca809fef2a75359266f2ca1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126980
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27070}
2019-03-12 10:06:04 +00:00
Danil Chapovalov
effdfe2014 Move dependency on chromium DefaultTaskQueueFactory
That will avoid linkage error of targets that depend
on global_task_queue_factory without depending on rtc_task_queue

Bug: webrtc:10191
Change-Id: Ia67ea0a3abb715e28160e4e376133cc0309b14e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27053}
2019-03-11 11:28:28 +00:00
Danil Chapovalov
4423c36448 Migrate RepeatingTask to take raw pointer to TaskQueueBase instead of TaskQueue
In particular replace call rtc::TaskQueue::Current with TaskQueueBase::Current

Bug: webrtc:10191
Change-Id: I19d42a716d27f0aba087dc70ac65b4ee6249408f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125085
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27005}
2019-03-06 18:44:35 +00:00
Danil Chapovalov
07a4f2b267 Merge rtc_task_queue(_api|_impl)? build targets into one
Ignore rtc_link_task_queue_impl flag,
instead use build_with_chromium for custom chromium implementation injection

This changes TaskQueue implementation used in webrtc fuzzers in chromium:
from own webrtc implementation to chromium's.

Bug: webrtc:10191
Change-Id: I63be28b680ae8ea8ee1dbf0c699263c392ce29d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125196
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26977}
2019-03-05 20:13:38 +00:00
Danil Chapovalov
3b548ddb1c Move rtc::NewClosure into own build target as ToQueuedTask
to make it usable without need to depend on rtc_task_queue

Bug: webrtc:10191
Change-Id: I2ae1445cf5d498aa6928d66b6823f2f940987767
Reviewed-on: https://webrtc-review.googlesource.com/c/125084
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26942}
2019-03-04 09:00:38 +00:00
Danil Chapovalov
d00405f89a Drop support for link-time injection of the rtc::TaskQueue::Impl
Bug: webrtc:10191
Change-Id: I1b975e8a2230dd45828a4e7f4d5a86f61164445a
Reviewed-on: https://webrtc-review.googlesource.com/c/124121
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26870}
2019-02-27 10:07:34 +00:00
Danil Chapovalov
2684ab3db0 Test default TaskQueue implementation via TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I97a73311790e8ceac00d5575dd124ad8ad76503f
Reviewed-on: https://webrtc-review.googlesource.com/c/124400
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26853}
2019-02-26 14:01:45 +00:00
Mirko Bonadei
a9cfa476fe Revert "Delete rtc_task_queue_impl build target"
This reverts commit 56973e627e.

Reason for revert: Breaks libfuzzer-asan Chromium trybots:
E.g.
https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-libfuzzer-asan-rel/112220

Original change's description:
> Delete rtc_task_queue_impl build target
> 
> Bug: webrtc:10191
> Change-Id: I2ba660c403919708d28b5f5f2bdcffdb1e4ee486
> Reviewed-on: https://webrtc-review.googlesource.com/c/124040
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26826}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org

Change-Id: Ic04fc725e0a9cba84584ecf043b39b9d68f69bc7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/124124
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26828}
2019-02-24 09:17:31 +00:00
Danil Chapovalov
56973e627e Delete rtc_task_queue_impl build target
Bug: webrtc:10191
Change-Id: I2ba660c403919708d28b5f5f2bdcffdb1e4ee486
Reviewed-on: https://webrtc-review.googlesource.com/c/124040
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26826}
2019-02-23 13:03:15 +00:00
Danil Chapovalov
fa52efadf1 Migrate stdlib task queue to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I16e13b69dce7cafa545977e9ac253b6e57312690
Reviewed-on: https://webrtc-review.googlesource.com/c/123760
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26796}
2019-02-21 14:36:07 +00:00
Danil Chapovalov
826f2e7f34 Migrate win task queue to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I498c4187883206d7082d9f7323575f087e041370
Reviewed-on: https://webrtc-review.googlesource.com/c/123485
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26791}
2019-02-21 09:33:42 +00:00
Danil Chapovalov
47cf5eaca4 Migrate gcd task queue implementation to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: If15138f97445484668d3e42f3a35875521c38545
Reviewed-on: https://webrtc-review.googlesource.com/c/122501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26782}
2019-02-20 17:08:53 +00:00
Danil Chapovalov
eb1752412a Migrate libevent task queue implementation to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I480da22f6db781e877dcb92d46ce7f445892df6a
Reviewed-on: https://webrtc-review.googlesource.com/c/118929
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26644}
2019-02-12 10:58:36 +00:00
Danil Chapovalov
87ce874f99 Allow link-time injection of the DefaultTaskQueueFactory
Bug: webrtc:10191
Change-Id: If6a2fb32bee63328cf2cb86be2aac69bc5bd65dd
Reviewed-on: https://webrtc-review.googlesource.com/c/120964
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26552}
2019-02-05 14:43:27 +00:00
Danil Chapovalov
33b716f7dd Publish task queue test suite.
The set of tests is a copy of rtc_base/task_queue_unittests excluding tests
that verify rtc::NewClosure rather than task queue implementation itself.

Bug: webrtc:10191
Change-Id: I94e962ad63ff6510c43a97ef0cd4da7d08f25538
Reviewed-on: https://webrtc-review.googlesource.com/c/118445
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26369}
2019-01-23 11:55:12 +00:00
Danil Chapovalov
b4c6d1e6d9 Connect global task queue factory and rtc::TaskQueue
This cl allows to overwrite TaskQueue implementation
by depending on and setting the global task queue factory.

Bug: webrtc:10191
Change-Id: I69ceb139d00078d3be90eeb4e240758b88829c20
Reviewed-on: https://webrtc-review.googlesource.com/c/118060
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26345}
2019-01-21 16:08:31 +00:00
Danil Chapovalov
baaf911c80 Introduce global task queue factory.
Bug: webrtc:10191
Change-Id: I7bdc97fd626da955b9194a9a0d8ed4f5aebddf66
Reviewed-on: https://webrtc-review.googlesource.com/c/118120
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26315}
2019-01-18 11:25:15 +00:00
Danil Chapovalov
348b08ac3e Introduce webrtc::TaskQueue and TaskQueueFactory interfaces
Bug: webrtc:10191
Change-Id: Ia2fff34cb260d904f25f7263051695f1c004a53b
Reviewed-on: https://webrtc-review.googlesource.com/c/117360
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26295}
2019-01-17 13:10:14 +00:00
Danil Chapovalov
959e9b6b57 Publish rtc::QueuedTask in api as webrtc::QueuedTask
Bug: webrtc:10191
Change-Id: I7dcba28615c2f3e44442be410dedde15f5fb1deb
Reviewed-on: https://webrtc-review.googlesource.com/c/113502
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26244}
2019-01-14 14:48:12 +00:00