Skip to content

Commit

Permalink
Pull GN @ r262225
Browse files Browse the repository at this point in the history
Implement GN visibility in the build, which this new version implements

BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/217273004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262438 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed Apr 8, 2014
1 parent 2c69d82 commit 6e5e4c9
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions base/allocator/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

static_library("allocator_extension_thunks") {
visibility = "//base/*"
sources = [
"allocator_extension_thunks.cc",
"allocator_extension_thunks.h",
Expand Down
1 change: 1 addition & 0 deletions base/third_party/nspr/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

static_library("nspr") {
visibility = "//base/*"
sources = [
"prtime.cc",
"prtime.h",
Expand Down
1 change: 1 addition & 0 deletions base/third_party/symbolize/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

static_library("symbolize") {
visibility = "//base/*"
sources = [
"config.h",
"demangle.cc",
Expand Down
1 change: 1 addition & 0 deletions base/third_party/xdg_mime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

static_library("xdg_mime") {
visibility = "//base/*"
sources = [
"xdgmime.c",
"xdgmime.h",
Expand Down
1 change: 1 addition & 0 deletions base/third_party/xdg_user_dirs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

static_library("xdg_user_dirs") {
visibility = "//base/*"
sources = [
"xdg_user_dir_lookup.cc",
"xdg_user_dir_lookup.h",
Expand Down
3 changes: 3 additions & 0 deletions build/config/linux/pkg_config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ template("pkg_config") {
if (defined(invoker.defines)) {
defines = invoker.defines
}
if (defined(invoker.visibility)) {
visibility = invoker.visibility
}
}
}
1 change: 0 additions & 1 deletion build/toolchain/nacl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


toolchain("x86_newlib") {
toolprefix = "gen/sdk/toolchain/linux_x86_newlib/bin/x86_64-nacl-"
cc = toolprefix + "gcc"
Expand Down
3 changes: 1 addition & 2 deletions build/toolchain/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/win/visual_studio_version.gni")
import("//build/toolchain/goma.gni")

# Should only be running on Windows.
assert(is_win)

import("//build/config/win/visual_studio_version.gni")

# Setup the Visual Studio state.
#
# Its arguments are the VS path and the compiler wrapper tool. It will write
Expand Down
2 changes: 1 addition & 1 deletion tools/gn/bin/linux/gn.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19d0fda98eff41476d011f24ccc40e9740d8eb5c
d235ab099523dde48cc04c0f20339ff370627209
2 changes: 1 addition & 1 deletion tools/gn/bin/linux/gn32.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fdbb87e903677c6aeb66ba0e0edf1e7ffaef32bc
cf147bbdcb10f2f3446688112280496fafa6e328
2 changes: 1 addition & 1 deletion tools/gn/bin/mac/gn.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21ac865cd8d426cf46c1061190c7bd5e98d5fe3f
709f1ea596637bb8dd260a6e3706266936e9e12a
2 changes: 1 addition & 1 deletion tools/gn/bin/win/gn.exe.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a6e110ec959cd56c82e0c8d03546209f85ff2ac8
06e4a53c2ac1553daba55e2eeee41acbbdd612d6
5 changes: 5 additions & 0 deletions tools/gn/secondary/testing/gtest/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# found in the LICENSE file.

config("gtest_config") {
visibility = [
":*",
"//testing/gmock:*", # gmock also shares this config.
]

defines = [
"UNIT_TEST",

Expand Down
10 changes: 9 additions & 1 deletion tools/gn/secondary/tools/grit/grit_rule.gni
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ template("grit") {
grit_config = target_name + "_grit_config"
config(grit_config) {
include_dirs = [ target_gen_dir ]

# Only our generated static library can depend on this.
visibility = ":" + target_name
}

grit_custom_target = target_name + "_grit"
Expand All @@ -70,7 +73,8 @@ template("grit") {
"-o", output_dir,
] + grit_flags

# Inherit deps from template invocation if any.
# Only our generated static library can depend on this.
visibility = ":" + target_name
}

# This is the thing that people actually link with, it must be named the
Expand All @@ -86,5 +90,9 @@ template("grit") {
deps = []
deps = [ ":$grit_custom_target" ]
direct_dependent_configs = [ ":$grit_config" ]

if (defined(invoker.visibility)) {
visibility = invoker.visibility
}
}
}

0 comments on commit 6e5e4c9

Please sign in to comment.