Simplify the thunk targets since we don't support apps as components Since we don't support using the component build to produce mojo apps, we can simplify the build targets in a few ways: *) every mojo_native_application must depend on the c system thunks, so just make that part of the template instead of requiring the dep *) there's no such thing as depending on gles2 headers from a component, so delete the forwarding group. Most targets that want to use the gles2 headers in a mojo context want to depend on an implementation through the thunks, so //mojo/public/c/gles2 does just that. A smaller number of targets (such as the implementation of the thunks) want to just depend on the headers but not an impl, so they can depend on //mojo/public/c/gles2:headers. The //mojo/public/gles target isn't that useful since the only thing we expose is a set of C entry points. We can probably also simplify the c system targets, but that's trickier due to more extensive use from the chromium side. BUG=438701 R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/780733002
diff --git a/benchmarks/startup/BUILD.gn b/benchmarks/startup/BUILD.gn index 29411a0..7bb0f95 100644 --- a/benchmarks/startup/BUILD.gn +++ b/benchmarks/startup/BUILD.gn
@@ -18,10 +18,6 @@ testonly = true sources = [ "startup.cc" ] - - deps = [ - "//mojo/public/c/system:for_shared_library", - ] } executable("noop") {
diff --git a/examples/apptest/BUILD.gn b/examples/apptest/BUILD.gn index cd3db25..7c109c8 100644 --- a/examples/apptest/BUILD.gn +++ b/examples/apptest/BUILD.gn
@@ -26,7 +26,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", @@ -47,7 +46,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/application:test_support_standalone", "//mojo/public/cpp/bindings:callback",
diff --git a/examples/aura_demo/BUILD.gn b/examples/aura_demo/BUILD.gn index 657f441..0619bb3 100644 --- a/examples/aura_demo/BUILD.gn +++ b/examples/aura_demo/BUILD.gn
@@ -24,7 +24,6 @@ "//mojo/common", "//mojo/converters/geometry", "//mojo/aura", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/system", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/native_viewport", @@ -44,7 +43,6 @@ deps = [ "//base", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/interfaces/application", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/view_manager",
diff --git a/examples/bitmap_uploader/BUILD.gn b/examples/bitmap_uploader/BUILD.gn index 86d9363..ec7b877 100644 --- a/examples/bitmap_uploader/BUILD.gn +++ b/examples/bitmap_uploader/BUILD.gn
@@ -11,14 +11,12 @@ public_deps = [ "//base", "//mojo/public/c/gles2", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/interfaces/gpu", "//mojo/services/public/interfaces/surfaces", ] deps = [ "//mojo/application", "//mojo/public/cpp/bindings:bindings", - "//mojo/public/gles2:for_shared_library", "//mojo/public/interfaces/application", "//mojo/services/public/cpp/geometry", "//mojo/services/public/cpp/surfaces",
diff --git a/examples/browser/BUILD.gn b/examples/browser/BUILD.gn index 38d0ba3..793eb92 100644 --- a/examples/browser/BUILD.gn +++ b/examples/browser/BUILD.gn
@@ -21,7 +21,6 @@ "//mojo/common", "//mojo/converters/geometry", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/input_events",
diff --git a/examples/content_handler_demo/BUILD.gn b/examples/content_handler_demo/BUILD.gn index bb8df20..7497ea0 100644 --- a/examples/content_handler_demo/BUILD.gn +++ b/examples/content_handler_demo/BUILD.gn
@@ -10,7 +10,6 @@ ] deps = [ - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility",
diff --git a/examples/echo/BUILD.gn b/examples/echo/BUILD.gn index fa45791..b16a2fb 100644 --- a/examples/echo/BUILD.gn +++ b/examples/echo/BUILD.gn
@@ -17,7 +17,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", @@ -31,7 +30,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility",
diff --git a/examples/embedded_app/BUILD.gn b/examples/embedded_app/BUILD.gn index 2e02a72..c47023c 100644 --- a/examples/embedded_app/BUILD.gn +++ b/examples/embedded_app/BUILD.gn
@@ -14,10 +14,9 @@ "//examples/bitmap_uploader", "//examples/window_manager:bindings", "//mojo/application", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/navigation",
diff --git a/examples/ganesh_app/BUILD.gn b/examples/ganesh_app/BUILD.gn index 4d885fb..c74aee7 100644 --- a/examples/ganesh_app/BUILD.gn +++ b/examples/ganesh_app/BUILD.gn
@@ -24,12 +24,11 @@ "//mojo/converters/surfaces", "//mojo/environment:chromium", "//mojo/gpu", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/public/interfaces/application", "//mojo/services/public/cpp/geometry", "//mojo/services/public/cpp/surfaces",
diff --git a/examples/http_handler/BUILD.gn b/examples/http_handler/BUILD.gn index 970ef0f..f8d3bc2 100644 --- a/examples/http_handler/BUILD.gn +++ b/examples/http_handler/BUILD.gn
@@ -12,7 +12,6 @@ deps = [ "//base", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//services/http_server", "//services/http_server/public",
diff --git a/examples/indirect_service/BUILD.gn b/examples/indirect_service/BUILD.gn index 0c56928..44b1139 100644 --- a/examples/indirect_service/BUILD.gn +++ b/examples/indirect_service/BUILD.gn
@@ -24,7 +24,6 @@ "//mojo/application", "//mojo/common", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", ] @@ -37,7 +36,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", @@ -51,7 +49,6 @@ deps = [ ":bindings", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility",
diff --git a/examples/keyboard/BUILD.gn b/examples/keyboard/BUILD.gn index cfed187..3729a30 100644 --- a/examples/keyboard/BUILD.gn +++ b/examples/keyboard/BUILD.gn
@@ -27,7 +27,6 @@ "//mojo/common", "//mojo/converters/geometry", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/navigation",
diff --git a/examples/media_viewer/BUILD.gn b/examples/media_viewer/BUILD.gn index 2b4aad4..405acb8 100644 --- a/examples/media_viewer/BUILD.gn +++ b/examples/media_viewer/BUILD.gn
@@ -18,7 +18,6 @@ "//base", "//mojo/application", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/navigation", "//mojo/services/public/interfaces/view_manager",
diff --git a/examples/nesting_app/BUILD.gn b/examples/nesting_app/BUILD.gn index 6ce143b..34bd610 100644 --- a/examples/nesting_app/BUILD.gn +++ b/examples/nesting_app/BUILD.gn
@@ -14,7 +14,6 @@ "//examples/bitmap_uploader", "//examples/window_manager:bindings", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//mojo/services/public/cpp/view_manager",
diff --git a/examples/pdf_viewer/BUILD.gn b/examples/pdf_viewer/BUILD.gn index 2f16799..2d7fe84 100644 --- a/examples/pdf_viewer/BUILD.gn +++ b/examples/pdf_viewer/BUILD.gn
@@ -13,7 +13,6 @@ "//examples/bitmap_uploader", "//mojo/application", "//mojo/application:content_handler", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//mojo/services/public/cpp/view_manager",
diff --git a/examples/png_viewer/BUILD.gn b/examples/png_viewer/BUILD.gn index a254622..6ea08bd 100644 --- a/examples/png_viewer/BUILD.gn +++ b/examples/png_viewer/BUILD.gn
@@ -14,7 +14,6 @@ "//examples/media_viewer:bindings", "//mojo/application", "//mojo/application:content_handler", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//mojo/services/public/cpp/view_manager",
diff --git a/examples/recursive_content_handler/BUILD.gn b/examples/recursive_content_handler/BUILD.gn index d4ff567..851420e 100644 --- a/examples/recursive_content_handler/BUILD.gn +++ b/examples/recursive_content_handler/BUILD.gn
@@ -13,7 +13,6 @@ "//base", "//mojo/application", "//mojo/application:content_handler", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//mojo/services/public/interfaces/content_handler",
diff --git a/examples/sample_app/BUILD.gn b/examples/sample_app/BUILD.gn index 597a71b..34bc5c3 100644 --- a/examples/sample_app/BUILD.gn +++ b/examples/sample_app/BUILD.gn
@@ -15,13 +15,12 @@ ":spinning_cube", "//base", "//gpu/command_buffer/client:gles2_interface", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/native_viewport", ] @@ -35,6 +34,6 @@ deps = [ "//base", - "//mojo/public/gles2:for_shared_library", + "//mojo/public/c/gles2", ] }
diff --git a/examples/sky_compositor_app/BUILD.gn b/examples/sky_compositor_app/BUILD.gn index 287c850..f2d2ac4 100644 --- a/examples/sky_compositor_app/BUILD.gn +++ b/examples/sky_compositor_app/BUILD.gn
@@ -15,7 +15,6 @@ "//mojo/common", "//mojo/converters/geometry", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system",
diff --git a/examples/surfaces_app/BUILD.gn b/examples/surfaces_app/BUILD.gn index 606e378..000500d 100644 --- a/examples/surfaces_app/BUILD.gn +++ b/examples/surfaces_app/BUILD.gn
@@ -31,7 +31,6 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/system", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/gpu", @@ -62,7 +61,6 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/surfaces", @@ -96,11 +94,10 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/gpu", "//mojo/services/public/interfaces/surfaces",
diff --git a/examples/wget/BUILD.gn b/examples/wget/BUILD.gn index cde83e0..8eebf97 100644 --- a/examples/wget/BUILD.gn +++ b/examples/wget/BUILD.gn
@@ -6,7 +6,6 @@ mojo_native_application("wget") { deps = [ - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility",
diff --git a/examples/window_manager/BUILD.gn b/examples/window_manager/BUILD.gn index 32ca40b..721f429 100644 --- a/examples/window_manager/BUILD.gn +++ b/examples/window_manager/BUILD.gn
@@ -25,10 +25,9 @@ "//mojo/aura", "//mojo/converters/geometry", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/input_events",
diff --git a/examples/wm_flow/BUILD.gn b/examples/wm_flow/BUILD.gn index 43ff628..c3117ab 100644 --- a/examples/wm_flow/BUILD.gn +++ b/examples/wm_flow/BUILD.gn
@@ -32,7 +32,6 @@ "//ui/views", "//ui/wm:wm", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/input_events", "//mojo/views:views", @@ -53,7 +52,6 @@ "//base", "//examples/bitmap_uploader", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/interfaces/application:application", "//mojo/services/public/cpp/view_manager", "//skia", @@ -74,7 +72,6 @@ "//base", "//examples/bitmap_uploader", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", "//services/window_manager:lib", "//skia",
diff --git a/mojo/aura/BUILD.gn b/mojo/aura/BUILD.gn index 98b5f3e..3d508a0 100644 --- a/mojo/aura/BUILD.gn +++ b/mojo/aura/BUILD.gn
@@ -32,8 +32,8 @@ "//mojo/cc", "//mojo/converters/geometry", "//mojo/converters/surfaces", + "//mojo/public/c/gles2", "//mojo/public/cpp/application", - "//mojo/public/gles2:for_shared_library", "//mojo/public/interfaces/application:application", "//mojo/services/public/cpp/view_manager", "//mojo/services/public/interfaces/gpu",
diff --git a/mojo/cc/BUILD.gn b/mojo/cc/BUILD.gn index 6b52848..113148d 100644 --- a/mojo/cc/BUILD.gn +++ b/mojo/cc/BUILD.gn
@@ -12,9 +12,9 @@ "//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_interface", "//mojo/converters/surfaces", + "//mojo/public/c/gles2", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/interfaces/surfaces", "//skia", ]
diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn index f91be40..b79c425 100644 --- a/mojo/common/BUILD.gn +++ b/mojo/common/BUILD.gn
@@ -28,7 +28,7 @@ deps = [ "//base", "//base/third_party/dynamic_annotations", - "//mojo/public/c/system:for_component", + "//mojo/public/c/system", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//url",
diff --git a/mojo/converters/geometry/BUILD.gn b/mojo/converters/geometry/BUILD.gn index 2d0a1e0..1b704ba 100644 --- a/mojo/converters/geometry/BUILD.gn +++ b/mojo/converters/geometry/BUILD.gn
@@ -13,7 +13,7 @@ "//skia", "//ui/gfx/geometry", "//mojo/environment:chromium", - "//mojo/public/c/system:for_component", + "//mojo/public/c/system", "//mojo/services/public/interfaces/geometry", ]
diff --git a/mojo/converters/input_events/BUILD.gn b/mojo/converters/input_events/BUILD.gn index 94df786..22d1173 100644 --- a/mojo/converters/input_events/BUILD.gn +++ b/mojo/converters/input_events/BUILD.gn
@@ -21,7 +21,7 @@ "//ui/gfx/geometry", "//mojo/converters/geometry", "//mojo/environment:chromium", - "//mojo/public/c/system:for_component", + "//mojo/public/c/system", "//mojo/services/public/interfaces/input_events", "//mojo/services/public/interfaces/geometry", ]
diff --git a/mojo/converters/surfaces/BUILD.gn b/mojo/converters/surfaces/BUILD.gn index 85710cb..f90a4ee 100644 --- a/mojo/converters/surfaces/BUILD.gn +++ b/mojo/converters/surfaces/BUILD.gn
@@ -25,7 +25,7 @@ "//cc/surfaces:surface_id", "//gpu", "//mojo/environment:chromium", - "//mojo/public/c/system:for_component", + "//mojo/public/c/system", "//mojo/services/public/interfaces/surfaces:surface_id", "//mojo/services/public/interfaces/surfaces", ]
diff --git a/mojo/gles2/BUILD.gn b/mojo/gles2/BUILD.gn index 502bde5..cdca35f 100644 --- a/mojo/gles2/BUILD.gn +++ b/mojo/gles2/BUILD.gn
@@ -12,14 +12,10 @@ defines = [ "GLES2_USE_MOJO" ] } -# GYP version: mojo/mojo_base.gyp:mojo_gles2_impl -component("gles2") { - output_name = "mojo_gles2_impl" - +source_set("gles2") { sources = [ "command_buffer_client_impl.cc", "command_buffer_client_impl.h", - "gles2_impl_export.h", "gles2_impl.cc", "gles2_context.cc", "gles2_context.h", @@ -27,7 +23,6 @@ defines = [ "GL_GLEXT_PROTOTYPES", - "MOJO_GLES2_IMPL_IMPLEMENTATION", "MOJO_GLES2_IMPLEMENTATION", ] @@ -47,8 +42,8 @@ "//gpu/command_buffer/client:gles2_interface", "//gpu/command_buffer/common", "//mojo/environment:chromium", - "//mojo/public/c/gles2", - "//mojo/public/c/system:for_component", + "//mojo/public/c/gles2:headers", + "//mojo/public/c/system", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//mojo/services/public/interfaces/gpu",
diff --git a/mojo/gles2/gles2_impl.cc b/mojo/gles2/gles2_impl.cc index 8cfcff1..3d46ecd 100644 --- a/mojo/gles2/gles2_impl.cc +++ b/mojo/gles2/gles2_impl.cc
@@ -9,7 +9,6 @@ #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "mojo/gles2/gles2_context.h" -#include "mojo/gles2/gles2_impl_export.h" using mojo::gles2::GLES2Context;
diff --git a/mojo/gles2/gles2_impl_export.h b/mojo/gles2/gles2_impl_export.h deleted file mode 100644 index 3299ced..0000000 --- a/mojo/gles2/gles2_impl_export.h +++ /dev/null
@@ -1,31 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef MOJO_GLES2_GLES2_IMPL_EXPORT_H_ -#define MOJO_GLES2_GLES2_IMPL_EXPORT_H_ - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(MOJO_GLES2_IMPL_IMPLEMENTATION) -#define MOJO_GLES2_IMPL_EXPORT __declspec(dllexport) -#else -#define MOJO_GLES2_IMPL_EXPORT __declspec(dllimport) -#endif - -#else // !defined(WIN32) - -#if defined(MOJO_GLES2_IMPL_IMPLEMENTATION) -#define MOJO_GLES2_IMPL_EXPORT __attribute__((visibility("default"))) -#else -#define MOJO_GLES2_IMPL_EXPORT -#endif - -#endif // defined(WIN32) - -#else // defined(COMPONENT_BUILD) -#define MOJO_GLES2_IMPL_EXPORT -#endif - -#endif // MOJO_GLES2_GLES2_IMPL_EXPORT_H_
diff --git a/mojo/gpu/BUILD.gn b/mojo/gpu/BUILD.gn index 070c330..13418b1 100644 --- a/mojo/gpu/BUILD.gn +++ b/mojo/gpu/BUILD.gn
@@ -17,13 +17,13 @@ "//gpu/command_buffer/client:gles2_interface", "//gpu/command_buffer/common", "//mojo/environment:chromium", + "//mojo/public/c/gles2", "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/public/interfaces/application", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/gpu",
diff --git a/mojo/public/c/gles2/BUILD.gn b/mojo/public/c/gles2/BUILD.gn index df0007b..4b3f6af 100644 --- a/mojo/public/c/gles2/BUILD.gn +++ b/mojo/public/c/gles2/BUILD.gn
@@ -6,7 +6,13 @@ defines = [ "GLES2_USE_MOJO" ] } -source_set("gles2") { +group("gles2") { + public_configs = [ "//third_party/khronos:khronos_headers" ] + public_deps = [ ":headers" ] + deps = [ "//mojo/public/platform/native:gles2_thunks" ] +} + +source_set("headers") { sources = [ "gles2.h", "gles2_export.h",
diff --git a/mojo/public/gles2/BUILD.gn b/mojo/public/gles2/BUILD.gn deleted file mode 100644 index 5c21e78..0000000 --- a/mojo/public/gles2/BUILD.gn +++ /dev/null
@@ -1,35 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# In an is_component_build build, everything can link against //mojo/gles2 -# because it is built as a shared library. However, in a static build, -# //mojo/gles2 is linked into an executable (e.g., mojo_shell), and must be -# injected into other shared libraries (i.e., Mojo Apps) that need the mojo -# gles2 API. -# -# For component targets, add //mojo/public/gles2:for_component to your deps -# section. -# -# For shared_library targets (e.g., a Mojo App), add -# //mojo/public/gles2:for_shared_library to your deps - -group("for_shared_library") { - public_configs = [ "//third_party/khronos:khronos_headers" ] - public_deps = [ "//mojo/public/c/gles2" ] - - if (is_component_build) { - deps = [ "//mojo/gles2" ] - } else { - deps = [ "//mojo/public/platform/native:gles2_thunks" ] - } -} - -group("for_component") { - public_configs = [ "//third_party/khronos:khronos_headers" ] - public_deps = [ "//mojo/public/c/gles2" ] - - if (is_component_build) { - deps = [ "//mojo/gles2" ] - } -}
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni index 05ec369..3b93990 100644 --- a/mojo/public/mojo_application.gni +++ b/mojo/public/mojo_application.gni
@@ -69,8 +69,9 @@ datadeps = [ "//mojo/public/tools:copy_mojo_shell" ] } } + deps = [ "//mojo/public/c/system:for_shared_library" ] if (defined(invoker.deps)) { - deps = invoker.deps + deps += invoker.deps } if (defined(invoker.forward_dependent_configs_from)) { forward_dependent_configs_from = invoker.forward_dependent_configs_from
diff --git a/mojo/public/platform/native/BUILD.gn b/mojo/public/platform/native/BUILD.gn index e7919ae..a2f050c 100644 --- a/mojo/public/platform/native/BUILD.gn +++ b/mojo/public/platform/native/BUILD.gn
@@ -25,9 +25,8 @@ # source_set here, this flag change is not needed. } -# GYP version: mojo/mojo_public_gles2_for_loadable_module.gypi source_set("gles2_thunks") { - visibility = [ "//mojo/public/gles2:for_shared_library" ] + visibility = [ "//mojo/public/c/gles2" ] sources = [ "gles2_thunks.cc", @@ -47,7 +46,7 @@ configs += [ "//third_party/khronos:khronos_headers" ] deps = [ - "//mojo/public/c/gles2", + "//mojo/public/c/gles2:headers", "//mojo/public/c/environment", "//mojo/public/c/system", ]
diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn index 7e0208d..d58d249 100644 --- a/mojo/services/network/BUILD.gn +++ b/mojo/services/network/BUILD.gn
@@ -11,7 +11,6 @@ ":lib", "//base", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings:bindings", "//mojo/services/public/cpp/network", "//mojo/services/public/interfaces/network", @@ -70,7 +69,6 @@ "//base", "//mojo/application", "//mojo/application:test_support", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings:callback", "//mojo/services/public/cpp/network",
diff --git a/mojo/services/public/cpp/network/BUILD.gn b/mojo/services/public/cpp/network/BUILD.gn index f8db162..5f6ab06 100644 --- a/mojo/services/public/cpp/network/BUILD.gn +++ b/mojo/services/public/cpp/network/BUILD.gn
@@ -17,7 +17,7 @@ "//mojo/application", "//mojo/common", "//mojo/environment:chromium", - "//mojo/public/c/system:for_component", + "//mojo/public/c/system", "//mojo/public/cpp/system", "//mojo/services/public/interfaces/network", ]
diff --git a/mojo/services/public/cpp/view_manager/BUILD.gn b/mojo/services/public/cpp/view_manager/BUILD.gn index dffa4f1..90193d4 100644 --- a/mojo/services/public/cpp/view_manager/BUILD.gn +++ b/mojo/services/public/cpp/view_manager/BUILD.gn
@@ -28,7 +28,7 @@ ] deps = [ "//base", - "//mojo/public/c/gles2", + "//mojo/public/c/gles2:headers", "//mojo/public/cpp/application", "//mojo/public/cpp/bindings:bindings", "//mojo/public/interfaces/application",
diff --git a/mojo/tools/package_manager/BUILD.gn b/mojo/tools/package_manager/BUILD.gn index 5530bf5..5e90ce9 100644 --- a/mojo/tools/package_manager/BUILD.gn +++ b/mojo/tools/package_manager/BUILD.gn
@@ -23,7 +23,6 @@ "//base", "//mojo/application", "//mojo/common", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", "//mojo/services/public/interfaces/network",
diff --git a/services/clipboard/BUILD.gn b/services/clipboard/BUILD.gn index 4315b61..7fea77e 100644 --- a/services/clipboard/BUILD.gn +++ b/services/clipboard/BUILD.gn
@@ -16,7 +16,6 @@ "//mojo/application", "//mojo/common", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/services/public/interfaces/clipboard", "//ui/base",
diff --git a/services/http_server/BUILD.gn b/services/http_server/BUILD.gn index 788d728..ce330a5 100644 --- a/services/http_server/BUILD.gn +++ b/services/http_server/BUILD.gn
@@ -14,7 +14,6 @@ deps = [ "//base", "//mojo/common", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment",
diff --git a/services/js/BUILD.gn b/services/js/BUILD.gn index da74d53..bba86b3 100644 --- a/services/js/BUILD.gn +++ b/services/js/BUILD.gn
@@ -33,7 +33,6 @@ "//mojo/common", "//mojo/edk/js/", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", "//mojo/public/interfaces/application", @@ -66,7 +65,6 @@ deps = [ "//base", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/js/test:echo_service",
diff --git a/services/js/modules/gl/BUILD.gn b/services/js/modules/gl/BUILD.gn index 1b565e4..5e1f7c0 100644 --- a/services/js/modules/gl/BUILD.gn +++ b/services/js/modules/gl/BUILD.gn
@@ -16,6 +16,6 @@ "//v8", "//mojo/edk/js", "//mojo/environment:chromium", - "//mojo/public/gles2:for_shared_library", + "//mojo/public/c/gles2", ] }
diff --git a/services/native_viewport/BUILD.gn b/services/native_viewport/BUILD.gn index c211f0c..9842dbf 100644 --- a/services/native_viewport/BUILD.gn +++ b/services/native_viewport/BUILD.gn
@@ -27,7 +27,6 @@ "//base", "//mojo/application", "//mojo/common:tracing_impl", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings:bindings", "//mojo/services/public/interfaces/native_viewport", "//mojo/services/public/cpp/native_viewport:args",
diff --git a/services/surfaces/BUILD.gn b/services/surfaces/BUILD.gn index 006cbb1..83e5e94 100644 --- a/services/surfaces/BUILD.gn +++ b/services/surfaces/BUILD.gn
@@ -27,9 +27,8 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", - "//mojo/public/gles2:for_shared_library", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/gpu", "//mojo/services/public/interfaces/surfaces",
diff --git a/services/test_service/BUILD.gn b/services/test_service/BUILD.gn index 138856a..350a36c 100644 --- a/services/test_service/BUILD.gn +++ b/services/test_service/BUILD.gn
@@ -28,7 +28,6 @@ ":bindings", "//base", "//base:i18n", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings", @@ -53,7 +52,6 @@ ":bindings", "//base", "//base:i18n", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application", "//mojo/public/cpp/application:standalone", "//mojo/public/cpp/bindings",
diff --git a/services/tracing/BUILD.gn b/services/tracing/BUILD.gn index 9c068c1..6f6ba92 100644 --- a/services/tracing/BUILD.gn +++ b/services/tracing/BUILD.gn
@@ -17,7 +17,6 @@ "//base", "//mojo/application", "//mojo/common", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/application", ] }
diff --git a/services/view_manager/BUILD.gn b/services/view_manager/BUILD.gn index 432bc60..6f022a0 100644 --- a/services/view_manager/BUILD.gn +++ b/services/view_manager/BUILD.gn
@@ -18,7 +18,6 @@ "//mojo/application", "//mojo/common:tracing_impl", "//mojo/environment:chromium", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings:bindings", "//mojo/services/public/interfaces/window_manager", ] @@ -135,7 +134,6 @@ "//mojo/application", "//mojo/application:test_support", "//mojo/common", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/view_manager",
diff --git a/services/window_manager/BUILD.gn b/services/window_manager/BUILD.gn index a9bbebe..db87048 100644 --- a/services/window_manager/BUILD.gn +++ b/services/window_manager/BUILD.gn
@@ -16,7 +16,6 @@ "//base", "//mojo/application", "//mojo/common:tracing_impl", - "//mojo/public/c/system:for_shared_library", "//mojo/services/public/cpp/view_manager", ] }
diff --git a/sky/compositor/BUILD.gn b/sky/compositor/BUILD.gn index 05a5620..514cdcf 100644 --- a/sky/compositor/BUILD.gn +++ b/sky/compositor/BUILD.gn
@@ -26,11 +26,11 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/gpu", + "//mojo/public/c/gles2", "//mojo/public/cpp/bindings", "//mojo/public/cpp/environment", "//mojo/public/cpp/system", "//mojo/public/cpp/utility", - "//mojo/public/gles2:for_shared_library", "//mojo/public/interfaces/application", "//mojo/services/public/cpp/surfaces", "//mojo/services/public/interfaces/geometry",
diff --git a/sky/services/inspector/BUILD.gn b/sky/services/inspector/BUILD.gn index 111a13f..8eed1af 100644 --- a/sky/services/inspector/BUILD.gn +++ b/sky/services/inspector/BUILD.gn
@@ -20,7 +20,6 @@ "//base", "//mojo/application", "//mojo/common", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//net",
diff --git a/sky/tools/debugger/BUILD.gn b/sky/tools/debugger/BUILD.gn index 25a2d5c..41c0e33 100644 --- a/sky/tools/debugger/BUILD.gn +++ b/sky/tools/debugger/BUILD.gn
@@ -28,7 +28,6 @@ "//mojo/application", "//mojo/converters/geometry", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//mojo/services/public/cpp/view_manager",
diff --git a/sky/tools/debugger/prompt/BUILD.gn b/sky/tools/debugger/prompt/BUILD.gn index 8429d6c..a66d0e0 100644 --- a/sky/tools/debugger/prompt/BUILD.gn +++ b/sky/tools/debugger/prompt/BUILD.gn
@@ -14,7 +14,6 @@ deps = [ "//base", "//mojo/application", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/utility", "//services/tracing:bindings",
diff --git a/sky/tools/tester/BUILD.gn b/sky/tools/tester/BUILD.gn index d7a43f3..ce1b7bf 100644 --- a/sky/tools/tester/BUILD.gn +++ b/sky/tools/tester/BUILD.gn
@@ -20,7 +20,6 @@ "//mojo/application", "//mojo/converters/geometry", "//mojo/converters/input_events", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//mojo/public/cpp/utility",
diff --git a/sky/viewer/BUILD.gn b/sky/viewer/BUILD.gn index 44ce93b..78c8d34 100644 --- a/sky/viewer/BUILD.gn +++ b/sky/viewer/BUILD.gn
@@ -45,7 +45,6 @@ "//mojo/converters/geometry", "//mojo/converters/surfaces", "//mojo/edk/js", - "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//mojo/public/cpp/utility",