Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: mojo/public/c/system/BUILD.gn

Issue 554363005: GN: Replace mojo/system.gni with forwarding groups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/gles2/BUILD.gn ('k') | mojo/public/gles2/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/BUILD.gn
diff --git a/mojo/public/c/system/BUILD.gn b/mojo/public/c/system/BUILD.gn
index 8be5d62551f15e4cb223469e26e50f3ec06d9cd3..38a348680331a032e14b2307dfcae185890dd753 100644
--- a/mojo/public/c/system/BUILD.gn
+++ b/mojo/public/c/system/BUILD.gn
@@ -26,3 +26,29 @@ source_set("system") {
# that all dependent targets remove that link flag. Since GN uses a
# source_set here, this flag change is not needed.
}
+
+# In an is_component_build build, everything can link against //mojo/system
+# because it is built as a shared library. However, in a static build,
+# //mojo/system 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
+# system API.
+#
+# For component targets, add //mojo/public/c/system:for_component to your deps
+# section.
+#
+# For shared_library targets (e.g., a Mojo App), add
+# //mojo/public/c/system:for_shared_library to your deps
+
+group("for_shared_library") {
+ if (is_component_build) {
+ deps = [ "//mojo/system" ]
+ } else {
+ deps = [ ":system" ]
+ }
+}
+
+group("for_component") {
+ if (is_component_build) {
+ deps = [ "//mojo/system" ]
+ }
+}
« no previous file with comments | « mojo/gles2/BUILD.gn ('k') | mojo/public/gles2/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698