archrelease: copy trunk to community-any
[ArchLinux/community.git] / vivaldi-ffmpeg-codecs / trunk / gn-visibility-webrtc.patch
blob6d55754ecefdd3afdc19722cd480a702bbfc63e6
1 From 72c4d9fc95c336f61d7a8417b78f947a400ce792 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Tomasz=20=C5=9Aniatowski?= <tsniatowski@vewd.com>
3 Date: Tue, 14 Sep 2021 10:33:37 +0000
4 Subject: [PATCH] Relax googletest gn config visibility for webrtc
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 An upcoming gn roll will start enforcing config visibility on
10 public_configs and all_dependent_configs. Normally, configs with
11 limited visibility have corresponding helper targets that push the
12 configs using public_configs and are propagated with public_deps.
13 However, webrtc prefers to avoid public_deps, and pushes the gtest
14 config using all_dependent_configs. This requires direct visibility,
15 so tweak gtest BUILD.gn to make things work.
17 Bug: gn:252, 1249254
18 Change-Id: Ic7be22f7bf129255fb0ac51f437cd6dd3989e3a3
19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3158065
20 Commit-Queue: Tomasz Ĺšniatowski <tsniatowski@vewd.com>
21 Reviewed-by: Victor Costan <pwnall@chromium.org>
22 Cr-Commit-Position: refs/heads/main@{#921126}
23 ---
24 third_party/googletest/BUILD.gn | 8 +++++++-
25 1 file changed, 7 insertions(+), 1 deletion(-)
27 diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn
28 index fe240ebe954b6..d2bde47d75eab 100644
29 --- a/third_party/googletest/BUILD.gn
30 +++ b/third_party/googletest/BUILD.gn
31 @@ -5,7 +5,13 @@
32 import("//build_overrides/build.gni")
34 config("gtest_config") {
35 - visibility = [ ":*" ] # gmock also shares this config.
36 + # webrtc wants to push this config without a public_dep chain
37 + # TODO(crbug.com/1249254): figure out what to do with this
38 + visibility = [
39 + ":*", # gmock also shares this config.
40 + "//test:*", # webrts standalone setup
41 + "//third_party/webrtc/test:*",
42 + ]
44 defines = [
45 # Chromium always links googletest statically, so no API qualifier is