summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/nacl/BUILD.gn1
-rw-r--r--content/common/BUILD.gn9
-rw-r--r--gpu/BUILD.gn10
-rw-r--r--gpu/blink/BUILD.gn1
-rw-r--r--gpu/command_buffer/client/BUILD.gn54
-rw-r--r--gpu/command_buffer/common/BUILD.gn20
-rw-r--r--gpu/command_buffer/service/BUILD.gn22
-rw-r--r--gpu/config/BUILD.gn18
-rw-r--r--gpu/ipc/BUILD.gn18
-rw-r--r--media/base/BUILD.gn1
-rw-r--r--ppapi/proxy/BUILD.gn16
-rw-r--r--ppapi/shared_impl/BUILD.gn2
-rw-r--r--ppapi/thunk/BUILD.gn14
-rw-r--r--ui/gl/BUILD.gn4
-rw-r--r--ui/surface/BUILD.gn6
15 files changed, 147 insertions, 49 deletions
diff --git a/components/nacl/BUILD.gn b/components/nacl/BUILD.gn
index 8e9cd9b..cb4496f 100644
--- a/components/nacl/BUILD.gn
+++ b/components/nacl/BUILD.gn
@@ -146,7 +146,6 @@ if (enable_nacl) {
"//ppapi/c",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl",
- "//ppapi/thunk",
"//third_party/WebKit/public:blink",
"//third_party/jsoncpp",
]
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 8d739e77..25bb751 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -144,6 +144,7 @@ source_set("common") {
"//build/util:webkit_version",
"//components/tracing",
"//gpu/command_buffer/client:gles2_interface",
+ "//gpu/command_buffer/common:gles2_utils",
"//net",
"//skia",
"//third_party/icu",
@@ -279,8 +280,10 @@ source_set("common") {
}
if (use_x11) {
- include_dirs += [ "//third_party/khronos" ]
- configs += [ "//build/config/linux:xcomposite" ]
+ configs += [
+ "//build/config/linux:xcomposite",
+ "//third_party/khronos:khronos_headers",
+ ]
if (current_cpu != "arm" || !is_chromeos) {
sources += [ "gpu/x_util.h" ]
@@ -403,7 +406,7 @@ source_set("common") {
"gpu/media/dxva_video_decode_accelerator.cc",
"gpu/media/dxva_video_decode_accelerator.h",
]
- include_dirs += [ "//third_party/khronos" ]
+ configs += [ "//third_party/khronos:khronos_headers" ]
deps += [ "//ui/gl" ]
libs += [
"d3d9.lib",
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index d8ac30f..eba5e7a 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -40,12 +40,12 @@ config("gpu_implementation") {
component("gpu") {
public_deps = [
- "//gpu/command_buffer/client",
+ "//gpu/command_buffer/client:client_sources",
"//gpu/command_buffer/client:gles2_cmd_helper_sources",
- "//gpu/command_buffer/common",
- "//gpu/command_buffer/service",
- "//gpu/config",
- "//gpu/ipc",
+ "//gpu/command_buffer/common:common_sources",
+ "//gpu/command_buffer/service:service_sources",
+ "//gpu/config:config_sources",
+ "//gpu/ipc:ipc_sources",
]
}
diff --git a/gpu/blink/BUILD.gn b/gpu/blink/BUILD.gn
index 7d08ba11..d034c47 100644
--- a/gpu/blink/BUILD.gn
+++ b/gpu/blink/BUILD.gn
@@ -24,6 +24,7 @@ component("blink") {
"//base/third_party/dynamic_annotations",
"//cc",
"//gpu/command_buffer/common",
+ "//gpu/command_buffer/common:gles2_utils",
"//gpu/command_buffer/service",
"//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation",
diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn
index fabc82a..bbb7c0b 100644
--- a/gpu/command_buffer/client/BUILD.gn
+++ b/gpu/command_buffer/client/BUILD.gn
@@ -2,7 +2,38 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-source_set("client") {
+# The files here go into the "gpu" component in a component build (with
+# "command_buffer_client" and "gles2_cmd_helper" just forwarding) and goes into
+# separate static libraries in non-component build. This needs to match the
+# GYP build which was likely an attempt to make larger components to help with
+# loading.
+group("client") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":client_sources",
+ ]
+ }
+}
+
+group("gles2_cmd_helper") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":gles2_cmd_helper_sources",
+ ]
+ }
+}
+
+source_set("client_sources") {
+ visibility = [ "//gpu/*" ]
+
sources = [
"cmd_buffer_helper.cc",
"cmd_buffer_helper.h",
@@ -28,27 +59,12 @@ source_set("client") {
all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
deps = [
- "//gpu/command_buffer/common",
+ "//gpu/command_buffer/common:common_sources",
]
}
-group("gles2_cmd_helper") {
- if (is_component_build) {
- deps = [
- "//gpu",
- ]
- } else {
- deps = [
- ":gles2_cmd_helper_sources",
- ]
- }
-}
-
source_set("gles2_cmd_helper_sources") {
- visibility = [
- ":gles2_cmd_helper",
- "//gpu",
- ]
+ visibility = [ "//gpu/*" ]
sources = [
"gles2_cmd_helper.cc",
"gles2_cmd_helper.h",
@@ -62,7 +78,7 @@ source_set("gles2_cmd_helper_sources") {
]
deps = [
- ":client",
+ ":client_sources",
]
}
diff --git a/gpu/command_buffer/common/BUILD.gn b/gpu/command_buffer/common/BUILD.gn
index 57935ac..6f3ec0c 100644
--- a/gpu/command_buffer/common/BUILD.gn
+++ b/gpu/command_buffer/common/BUILD.gn
@@ -2,7 +2,25 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-source_set("common") {
+# The files here go into the "gpu" component in a component build (with
+# "command_buffer_common" just forwarding) and goes into a static library in
+# non-component build. This needs to match the GYP build which was likely an
+# attempt to make larger components to help with loading.
+group("common") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":common_sources",
+ ]
+ }
+}
+
+source_set("common_sources") {
+ visibility = [ "//gpu/*" ]
+
sources = [
"bitfield_helpers.h",
"buffer.cc",
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn
index 44b0909..8045a03 100644
--- a/gpu/command_buffer/service/BUILD.gn
+++ b/gpu/command_buffer/service/BUILD.gn
@@ -5,7 +5,21 @@
import("//build/config/ui.gni")
import("//third_party/protobuf/proto_library.gni")
-source_set("service") {
+group("service") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":service_sources",
+ ]
+ }
+}
+
+source_set("service_sources") {
+ visibility = [ "//gpu/*" ]
+
sources = [
"async_pixel_transfer_delegate.cc",
"async_pixel_transfer_delegate.h",
@@ -128,7 +142,7 @@ source_set("service") {
include_dirs = [ "//third_party/mesa/src/include" ]
public_deps = [
- "//gpu/command_buffer/common",
+ "//gpu/command_buffer/common:common_sources",
]
deps = [
":disk_cache_proto",
@@ -144,10 +158,6 @@ source_set("service") {
"//ui/gl",
]
- if (ui_compositor_image_transport) {
- include_dirs += [ "//third_party/khronos" ]
- }
-
if (is_win || is_android || (is_linux && use_x11)) {
sources += [
"async_pixel_transfer_manager_egl.cc",
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn
index f949358..add90ec 100644
--- a/gpu/config/BUILD.gn
+++ b/gpu/config/BUILD.gn
@@ -9,7 +9,21 @@ declare_args() {
use_libpci = true
}
-source_set("config") {
+group("config") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":config_sources",
+ ]
+ }
+}
+
+source_set("config_sources") {
+ visibility = [ "//gpu/*" ]
+
sources = [
"dx_diag_node.cc",
"dx_diag_node.h",
@@ -52,7 +66,7 @@ source_set("config") {
deps = [
"//base",
- "//gpu/command_buffer/service",
+ "//gpu/command_buffer/service:service_sources",
"//third_party/re2",
"//ui/gl",
]
diff --git a/gpu/ipc/BUILD.gn b/gpu/ipc/BUILD.gn
index d11d685..c78dea7 100644
--- a/gpu/ipc/BUILD.gn
+++ b/gpu/ipc/BUILD.gn
@@ -2,7 +2,21 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-source_set("ipc") {
+group("ipc") {
+ if (is_component_build) {
+ public_deps = [
+ "//gpu",
+ ]
+ } else {
+ public_deps = [
+ ":ipc_sources",
+ ]
+ }
+}
+
+source_set("ipc_sources") {
+ visibility = [ "//gpu/*" ]
+
sources = [
"gpu_command_buffer_traits.cc",
"gpu_command_buffer_traits.h",
@@ -14,7 +28,7 @@ source_set("ipc") {
]
deps = [
- "//gpu/command_buffer/common",
+ "//gpu/command_buffer/common:common_sources",
"//ipc",
]
}
diff --git a/media/base/BUILD.gn b/media/base/BUILD.gn
index 3203f7f..64c5b13 100644
--- a/media/base/BUILD.gn
+++ b/media/base/BUILD.gn
@@ -378,6 +378,7 @@ source_set("unittests") {
deps = [
":base",
":test_support",
+ "//gpu/command_buffer/common",
"//skia",
"//testing/gmock",
"//testing/gtest",
diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn
index 4af9bdc..31a0262 100644
--- a/ppapi/proxy/BUILD.gn
+++ b/ppapi/proxy/BUILD.gn
@@ -272,7 +272,7 @@ component("proxy") {
"//ipc",
"//media:shared_memory_support",
"//ppapi/c",
- "//ppapi/proxy:ipc",
+ "//ppapi/proxy:ipc_sources",
"//ppapi/shared_impl",
"//third_party/icu",
]
@@ -293,7 +293,19 @@ component("proxy") {
}
}
-source_set("ipc") {
+group("ipc") {
+ if (is_component_build) {
+ public_deps = [
+ "//ppapi/proxy",
+ ]
+ } else {
+ public_deps = [
+ ":ipc_sources",
+ ]
+ }
+}
+
+source_set("ipc_sources") {
sources = [
"nacl_message_scanner.cc",
"nacl_message_scanner.h",
diff --git a/ppapi/shared_impl/BUILD.gn b/ppapi/shared_impl/BUILD.gn
index 59f4ec0..64ae537 100644
--- a/ppapi/shared_impl/BUILD.gn
+++ b/ppapi/shared_impl/BUILD.gn
@@ -156,7 +156,7 @@ component("shared_impl") {
defines = [
"PPAPI_SHARED_IMPLEMENTATION",
- # This target also implements some thunk functions.
+ # This target goes in the same library as thunk (in GYP they are the same).
"PPAPI_THUNK_IMPLEMENTATION",
]
diff --git a/ppapi/thunk/BUILD.gn b/ppapi/thunk/BUILD.gn
index 5b326e4..18096a4 100644
--- a/ppapi/thunk/BUILD.gn
+++ b/ppapi/thunk/BUILD.gn
@@ -3,6 +3,12 @@
# found in the LICENSE file.
source_set("thunk") {
+ # In GYP this is the same target as shared_impl. In GN these are split apart
+ # for clarity but to get component builds correct, targets must only depend
+ # on these via the shared_impl component.
+ # TODO(brettw) separate these when GYP compat is no longer required.
+ visibility = [ "//ppapi/shared_impl" ]
+
sources = [
"enter.cc",
"enter.h",
@@ -189,5 +195,11 @@ source_set("thunk") {
]
}
- defines = [ "PPAPI_THUNK_IMPLEMENTATION" ]
+ defines = [
+ # This target goes in the same library as shared_impl (in GYP they are the
+ # same).
+ "PPAPI_SHARED_IMPLEMENTATION",
+
+ "PPAPI_THUNK_IMPLEMENTATION",
+ ]
}
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index 42b2e5b..f36138a 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -106,15 +106,15 @@ component("gl") {
include_dirs = [
"//third_party/switfshader/include",
- "//third_party/khronos",
"//third_party/mesa/src/include",
]
all_dependent_configs = [ ":gl_config" ]
+ public_configs = [ "//third_party/khronos:khronos_headers" ]
+
deps = [
"//base/third_party/dynamic_annotations",
- "//gpu/command_buffer/common",
"//skia",
]
public_deps = [
diff --git a/ui/surface/BUILD.gn b/ui/surface/BUILD.gn
index 3b25e0e..6e262a4 100644
--- a/ui/surface/BUILD.gn
+++ b/ui/surface/BUILD.gn
@@ -15,6 +15,8 @@ component("surface") {
"transport_dib_win.cc",
]
+ configs += [ "//third_party/khronos:khronos_headers" ]
+
defines = [ "SURFACE_IMPLEMENTATION" ]
deps = [
@@ -25,8 +27,4 @@ component("surface") {
"//ui/gfx/geometry",
"//ui/gl",
]
-
- if (use_x11) {
- include_dirs = [ "//third_party/khronos" ]
- }
}