aboutsummaryrefslogtreecommitdiff
path: root/webrtc.gni
diff options
context:
space:
mode:
authorKarl Wiberg <kwiberg@webrtc.org>2018-01-10 12:19:13 +0100
committerCommit Bot <commit-bot@chromium.org>2018-01-10 13:08:11 +0000
commit588c548657b3ddf76e7b3f241263eef7f5799f16 (patch)
tree2fddc378525be776ee5474c111c03ebd93f951d0 /webrtc.gni
parent84804b08fd72201f33090671a3041ab50af0837a (diff)
downloadwebrtc-588c548657b3ddf76e7b3f241263eef7f5799f16.tar.gz
GN rtc_* templates: Set default visibility to webrtc_root + "/*"
This means that by default, targets are visible to everything under the WebRTC root, but not visible to anything else. API targets are manually tagged with visibility "*", so that targets outside the WebRTC tree can see them. BUG=webrtc:8254 Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509 Reviewed-on: https://webrtc-review.googlesource.com/24140 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21548}
Diffstat (limited to 'webrtc.gni')
-rw-r--r--webrtc.gni22
1 files changed, 22 insertions, 0 deletions
diff --git a/webrtc.gni b/webrtc.gni
index b8ceb8e0f0..ffa92d4c4a 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -264,6 +264,13 @@ set_defaults("rtc_shared_library") {
suppressed_configs = []
}
+webrtc_default_visibility = [ webrtc_root + "/*" ]
+if (build_with_chromium) {
+ # Allow Chromium's WebRTC overrides targets to bypass the regular
+ # visibility restrictions.
+ webrtc_default_visibility += [ webrtc_root + "/../webrtc_overrides/*" ]
+}
+
template("rtc_test") {
test(target_name) {
forward_variables_from(invoker,
@@ -304,6 +311,9 @@ template("rtc_source_set") {
"visibility",
])
forward_variables_from(invoker, [ "visibility" ])
+ if (!defined(visibility)) {
+ visibility = webrtc_default_visibility
+ }
configs += invoker.configs
configs -= rtc_remove_configs
configs -= invoker.suppressed_configs
@@ -326,6 +336,9 @@ template("rtc_executable") {
"visibility",
])
forward_variables_from(invoker, [ "visibility" ])
+ if (!defined(visibility)) {
+ visibility = webrtc_default_visibility
+ }
configs += invoker.configs
configs -= rtc_remove_configs
configs -= invoker.suppressed_configs
@@ -352,6 +365,9 @@ template("rtc_static_library") {
"visibility",
])
forward_variables_from(invoker, [ "visibility" ])
+ if (!defined(visibility)) {
+ visibility = webrtc_default_visibility
+ }
configs += invoker.configs
configs -= rtc_remove_configs
configs -= invoker.suppressed_configs
@@ -373,6 +389,9 @@ template("rtc_shared_library") {
"visibility",
])
forward_variables_from(invoker, [ "visibility" ])
+ if (!defined(visibility)) {
+ visibility = webrtc_default_visibility
+ }
configs += invoker.configs
configs -= rtc_remove_configs
configs -= invoker.suppressed_configs
@@ -400,6 +419,9 @@ if (is_ios) {
"visibility",
])
forward_variables_from(invoker, [ "visibility" ])
+ if (!defined(visibility)) {
+ visibility = webrtc_default_visibility
+ }
configs += invoker.configs
configs -= rtc_remove_configs
configs -= invoker.suppressed_configs