Convert GN visibility variables to lists.
Currently this is either a list or a string. However, this is causing some problems because templates can't add to the invoker's visibility list without knowing if the original is a string or a list. In an effort to make this consistent, I'm converting all visibiltiy to be lists, and will remove support for strings in a future build. This exempts cld from header checking since it was confusing GN's header checker. It adds a ppapi header target as well that will be used by libyuv (that requires a roll). TBR=scottmg Review URL: https://codereview.chromium.org/544423002 Cr-Original-Commit-Position: refs/heads/master@{#293638} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 9af4262ad8020658ee04c07d13a2617af64147b1
This commit is contained in:
Родитель
d8c7c2f3d4
Коммит
36da715672
|
@ -54,7 +54,7 @@ config("gtest_config") {
|
|||
}
|
||||
|
||||
config("gtest_direct_config") {
|
||||
visibility = ":*"
|
||||
visibility = [ ":*" ]
|
||||
defines = [ "UNIT_TEST" ]
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import("//third_party/protobuf/proto_library.gni")
|
|||
|
||||
proto_library("cacheinvalidation_proto_cpp") {
|
||||
# Depend on cacheinvalidation instead.
|
||||
visibility = "//third_party/cacheinvalidation/*"
|
||||
visibility = [ "//third_party/cacheinvalidation/*" ]
|
||||
|
||||
sources = [
|
||||
"client.proto",
|
||||
|
|
|
@ -385,7 +385,7 @@ if (is_linux) {
|
|||
# TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency
|
||||
# without requiring nssckbi to be built as a shared library.
|
||||
source_set("nssckbi") {
|
||||
visibility = ":nss" # This target is internal implementation detail.
|
||||
visibility = [ ":nss" ] # This target is internal implementation detail.
|
||||
|
||||
sources = [
|
||||
"nss/lib/ckfw/builtins/anchor.c",
|
||||
|
|
|
@ -258,7 +258,7 @@ template("grit") {
|
|||
# The config and the action below get this visibility son only the generated
|
||||
# source set can depend on them. The variable "target_name" will get
|
||||
# overwritten inside the inner classes so we need to compute it here.
|
||||
target_visibility = ":$target_name"
|
||||
target_visibility = [ ":$target_name" ]
|
||||
|
||||
# The current grit setup makes an file in $output_dir/grit/foo.h that
|
||||
# the source code expects to include via "grit/foo.h". It would be nice to
|
||||
|
@ -301,7 +301,16 @@ template("grit") {
|
|||
|
||||
args += grit_flags + assert_files_flags
|
||||
|
||||
visibility = target_visibility
|
||||
if (defined(invoker.visibility)) {
|
||||
# This needs to include both what the invoker specified (since they
|
||||
# probably include generated headers from this target), as well as the
|
||||
# generated source set (since there's no guarantee that the visibility
|
||||
# specified by the invoker includes our target).
|
||||
#
|
||||
# Only define visibility at all if the invoker specified it. Otherwise,
|
||||
# we want to keep the public "no visibility specified" default.
|
||||
visibility = target_visibility + invoker.visibility
|
||||
}
|
||||
|
||||
deps = [ "//tools/grit:grit_sources" ]
|
||||
if (defined(invoker.deps)) {
|
||||
|
|
|
@ -37,7 +37,7 @@ template("midl") {
|
|||
type_library_file = "{{source_name_part}}.tlb"
|
||||
|
||||
action_foreach(action_name) {
|
||||
visibility = ":$source_set_name"
|
||||
visibility = [ ":$source_set_name" ]
|
||||
|
||||
# This functionality is handled by the win-tool because the GYP build has
|
||||
# MIDL support built-in.
|
||||
|
|
Загрузка…
Ссылка в новой задаче