Commit 11139282 authored by brettw@chromium.org's avatar brettw@chromium.org

Implement main blink target in GN.

This adds the "blink" and "blink_minimal" targets which code in Chrome generally uses to depend on Blink. These just forward to already-existing subtargets.

Adds visibility to other BUILD.gn files in blink to mark all non-public files visible only to either WebKit/* or WebKit/Source/*

R=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176546 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent dd46e3be
......@@ -7,6 +7,8 @@ if (is_clang) {
import("//build/config/clang/clang.gni")
}
visibility = "//third_party/WebKit/*"
# features ---------------------------------------------------------------------
config("features") {
......@@ -78,11 +80,3 @@ config("non_test_config") {
cflags += [ "-Wglobal-constructors" ]
}
}
# stubs ------------------------------------------------------------------------
# These set up include paths for targets that haven't been converted yet. They
# can be removed when the corresponding targets have been converted to GN.
config("npapi_stub") {
include_dirs = [ "//third_party/npapi", "//third_party/npapi/bindings" ]
}
......@@ -7,6 +7,8 @@ import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/core/core.gni")
import("//third_party/WebKit/Source/modules/modules.gni")
visibility = "//third_party/WebKit/*"
# Main interface IDL files (excluding dependencies and testing)
# are included as properties on global objects, and in aggregate bindings.
main_interface_idl_files = core_idl_files + modules_idl_files
......
......@@ -6,6 +6,8 @@ import("//third_party/WebKit/Source/bindings/core/core.gni")
import("//third_party/WebKit/Source/bindings/core/idl.gni")
import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
visibility = "//third_party/WebKit/*"
# GYP version: Source/bindings/core/generated.gyp:interfaces_info_individual_core
compute_interfaces_info_individual("interfaces_info_individual_core") {
sources_static = core_static_idl_files
......
......@@ -8,6 +8,8 @@ import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
import("//third_party/WebKit/Source/core/core.gni")
visibility = "//third_party/WebKit/Source/*"
# bindings_core_v8_generated in core/v8/generated.gyp
group("bindings_core_v8_generated") {
deps = [
......
......@@ -8,6 +8,8 @@ import("//third_party/WebKit/Source/bindings/modules/modules.gni")
import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
import("//third_party/WebKit/Source/build/scripts/scripts.gni")
visibility = "//third_party/WebKit/*"
# GYP version: Source/bindings/modules/generated.gyp:bindings_modules_generated
group("bindings_modules_generated") {
deps = [
......
......@@ -6,6 +6,8 @@ import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni")
import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
import("//third_party/WebKit/Source/modules/modules.gni")
visibility = "//third_party/WebKit/*"
# bindings_modules_generated in modules/v8/generated.gyp
group("bindings_modules_generated") {
deps = [
......
......@@ -6,6 +6,8 @@ import("//third_party/WebKit/Source/bindings/bindings.gni")
import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
import("//third_party/WebKit/Source/bindings/templates/templates.gni")
visibility = "//third_party/WebKit/*"
# A separate pre-caching step is *not required* to use lex/parse table
# caching in PLY, as the caches are concurrency-safe.
# However, pre-caching ensures that all compiler processes use the cached
......
......@@ -35,6 +35,9 @@ idl_compiler_files = get_path_info(_gypi.idl_compiler_files, "abspath")
template("compute_interfaces_info_individual") {
action(target_name) {
script = "$bindings_scripts_dir/compute_interfaces_info_individual.py"
if (defined(invoker.visibility)) {
visibility = invoker.visibility
}
# Save static list to temp file to avoid blowing out command-line length
# limit.
......
......@@ -13,6 +13,8 @@ import("//third_party/WebKit/Source/core/core.gni")
import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/platform/platform_generated.gni")
visibility = "//third_party/WebKit/Source/*"
rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir)
# Compute the optimization level. The GYP code sets "optimize: max" which sets
......@@ -73,7 +75,7 @@ source_set("generated") {
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
#"//third_party/libxslt", # TODO(GYP)
"//third_party/libxslt",
"//third_party/npapi",
"//third_party/qcms",
"//third_party/sqlite",
......@@ -99,7 +101,7 @@ source_set("prerequisites") {
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
#"//third_party/libxslt", # TODO(GYP)
"//third_party/libxslt",
"//third_party/npapi",
"//third_party/ots",
"//third_party/qcms",
......@@ -129,7 +131,6 @@ source_set("prerequisites") {
":core_include_dirs",
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
"//third_party/WebKit/Source:npapi_stub",
]
}
......@@ -140,6 +141,8 @@ source_set("prerequisites") {
#
# GYP version: WebKit/Source/core/core.gyp:webcore
source_set("core") {
visibility = "//third_party/WebKit/*"
exported_deps = [
":core_generated",
"//skia",
......@@ -165,7 +168,6 @@ source_set("core") {
direct_dependent_configs = [
":core_include_dirs",
"//third_party/WebKit/Source:npapi_stub",
]
# TODO(GYP) IPP libraries pkg-config. These seem to be experimental and used
......@@ -392,7 +394,6 @@ source_set("core_generated") {
configs += [
"..:inside_blink",
"..:npapi_stub",
]
deps = [
......@@ -410,7 +411,7 @@ source_set("core_generated") {
"//third_party/libpng",
"//third_party/libwebp",
"//third_party/libxml",
#"//third_party/libxslt/libxslt.gyp:libxslt", TODO(GYP)
"//third_party/libxslt",
"//third_party/npapi",
"//third_party/qcms",
"//third_party/sqlite",
......
......@@ -6,6 +6,8 @@ import("//third_party/WebKit/Source/build/convert_file_to_header_with_character_
import("//third_party/WebKit/Source/bindings/bindings.gni")
import("//third_party/WebKit/Source/core/core.gni")
visibility = "//third_party/WebKit/Source/*"
protocol_file = "../../devtools/protocol.json"
action("protocol_sources") {
......
......@@ -8,8 +8,12 @@ import("//third_party/WebKit/Source/build/make_file_arrays.gni")
import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/modules/modules.gni")
visibility = "//third_party/WebKit/Source/*"
# GYP version: WebKit/Source/modules/modules.gyp:modules
source_set("modules") {
visibility = "//third_party/WebKit/*"
sources = rebase_path(modules_files, ".", "//")
sources += rebase_path(bindings_modules_generated_aggregate_files, ".", "//")
......
......@@ -7,6 +7,9 @@ import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/config.gni")
import("//third_party/WebKit/Source/platform/platform_generated.gni")
# Most targets in this file are private actions so use that as the default.
visibility = ":*"
# TODO(GYP) Remove when test targets link (depends on ffmpeg)
enable_blink_platform_test_targets = false
......@@ -36,6 +39,7 @@ blink_platform_neon_files = [
# blink_common in blink_platform.gyp
component("blink_common") {
visibility = "//third_party/WebKit/*"
sources = [
"exported/WebCString.cpp",
"exported/WebString.cpp",
......@@ -157,6 +161,7 @@ action("color_data") {
# This isn't strictly necessary since we can just add the deps to "platform",
# but it helps to have the targets match the GYP build.
group("make_platform_generated") {
visibility = "//third_party/WebKit/Source/*"
deps = [
":blink_common",
":color_data",
......@@ -168,6 +173,7 @@ group("make_platform_generated") {
# TODO(brettw) Objective C Renaming postbuild steps on Mac.
# blink_platform target in blink_platform.gyp
component("platform") {
visibility = "//third_party/WebKit/*"
output_name = "blink_platform"
sources = platform_gypi.platform_files
......@@ -340,7 +346,6 @@ component("platform") {
}
}
yasm_assemble("heap_asm_stubs") {
if (cpu_arch == "x86" || cpu_arch == "x64") {
sources = [ "heap/asm/SaveRegisters_x86.asm" ]
......
......@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
visibility = "//third_party/WebKit/Source/*"
source_set("heap") {
sources = [
"AddressSanitizer.h",
......
......@@ -6,6 +6,8 @@ import("//build/config/ui.gni")
import("//third_party/WebKit/Source/config.gni")
import("//third_party/WebKit/Source/build/make_file_arrays.gni")
visibility = "//third_party/WebKit/*"
web_gypi = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("web.gypi") ],
......
......@@ -8,6 +8,8 @@ gypi_values = exec_script("//build/gypi_to_gn.py",
"scope",
[ "wtf.gypi" ])
visibility = "//third_party/WebKit/*"
config("wtf_config") {
if (is_win) {
defines = [
......
......@@ -4,6 +4,37 @@
if (!is_android) {
# GYP version: WebKit/public/blink.gyp:blink
group("blink") {
deps = [
":blink_headers",
":blink_minimal",
"//third_party/WebKit/Source/platform",
"//third_party/WebKit/Source/web",
]
}
# This target provides a minimal set of Blink APIs such as WebString to use in
# places that cannot link against the full Blink library. FIXME: We really
# shouldn't have this at all and should instead remove all uses of Blink's API
# types from places that can't link against Blink. crbug.com/248653
#
# GYP version: WebKit/public/blink.gyp:blink_minimal
group("blink_minimal") {
deps = [
"//third_party/WebKit/Source/platform:blink_common",
]
}
# TODO(GYP) enable this when web:test_support exists.
# GYP version: WebKit/public/blink.gyp:blink_test_support
#group("test_support") {
# deps = [
# "//third_party/WebKit/Source/web:test_support",
# ]
#}
# GYP version: WebKit/public/all.gyp:all_blink
group("all_blink") {
deps = [
"//third_party/WebKit/Source/core",
......@@ -14,7 +45,7 @@ group("all_blink") {
]
}
}
} # !is_android
config("blink_headers_config") {
include_dirs = [ ".." ]
......@@ -26,12 +57,14 @@ source_set("blink_headers") {
direct_dependent_configs = [ ":blink_headers_config" ]
}
# GYP version: WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources
group("blink_devtools_frontend_resources") {
deps = [
"//third_party/WebKit/Source/devtools:devtools_frontend_resources",
]
}
# GYP version: WebKit/public/blink_devtools.gyp:blink_generate_devtools_grd
group("blink_generate_devtools_grd") {
deps = [
"//third_party/WebKit/Source/devtools:generate_devtools_grd",
......
......@@ -33,6 +33,7 @@
],
'targets': [
{
# GN version: //third_party/WebKit/public:all_blink
'target_name': 'all_blink',
'type': 'none',
'dependencies': [
......
......@@ -33,6 +33,7 @@
],
'targets': [
{
# GN version: //third_party/WebKit/public:blink
'target_name': 'blink',
'type': 'none',
'dependencies': [
......@@ -52,6 +53,8 @@
# places that cannot link against the full Blink library.
# FIXME: We really shouldn't have this at all and should instead remove all uses
# of Blink's API types from places that can't link against Blink. crbug.com/248653
#
# GN version: //third_party/WebKit/public:blink_minimal
'target_name': 'blink_minimal',
'type': 'none',
'dependencies': [
......@@ -62,6 +65,7 @@
],
},
{
# GN version: //third_party/WebKit/public:test_support
'target_name': 'blink_test_support',
'type': 'none',
'dependencies': [
......
......@@ -30,6 +30,7 @@
{
'targets': [
{
# GN version: //third_party/WebKit/public:blink_devtools_frontend_resources
'target_name': 'blink_devtools_frontend_resources',
'type': 'none',
'dependencies': [
......@@ -37,6 +38,7 @@
],
},
{
# GN version: //third_party/WebKit/public:blink_generate_devtools_grd
'target_name': 'blink_generate_devtools_grd',
'type': 'none',
'dependencies': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment