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

Unified Diff: content/BUILD.gn

Issue 554393009: Make chrome GN build work in component mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo gyp changes 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 | « chrome/browser/BUILD.gn ('k') | content/app/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/BUILD.gn
diff --git a/content/BUILD.gn b/content/BUILD.gn
index 7f4a198dcb0dad359fdb03504b2c377e134be52b..5208fbced4db3fdba27f7385a5fe81f60a6bc5c4 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -9,16 +9,43 @@ config("content_implementation") {
defines = [ "CONTENT_IMPLEMENTATION" ]
}
+# When targets depend on, e.g. //content/public/browser, what happens? To
+# facilitate the complexity here, the "public" targets are groups that forward
+# to the right thing depending on the build mode. Say for additional
+# illustration, the public browser sources also depend on the public common
+# ones.
+#
+# The non-component build is easy:
+# foo ->
+# //content/public/browser (group) ->
+# //content/public/browser:browser_sources (source set) ->
+# //content/browser (source set, this is the non-public browser target)
+# //content/public/common:common_sources (source set)
+#
+# The component build is more complicated because we want everybody to depend on
+# one content shared library regardless of which public target they depend on:
+# foo ->
+# //content/public/browser (group) ->
+# //content (shared library) ->
+# //content/public/browser:browser_sources (source set) ->
+# //content/browser (source set; this is the non-public browser target)
+# //content/public/common:common_sources (source set)
+#
+# That the internal content dependencies must depend on the *_sources targets
+# to avoid dependency cycles, and external dependencies must depend on the
+# //content/public/browser and similar targets to avoid double-linking (these
+# targets make sure the dependency goes through the content shared library
+# when doing a component build).
+
content_shared_components = [
"//content/gpu",
"//content/plugin",
"//content/public/browser:browser_sources",
- "//content/public/child",
- "//content/public/common",
- "//content/public/plugin",
- "//content/public/renderer",
- "//content/public/utility",
- "//content/renderer",
+ "//content/public/child:child_sources",
+ "//content/public/common:common_sources",
+ "//content/public/plugin:plugin_sources",
+ "//content/public/renderer:renderer_sources",
+ "//content/public/utility:utility_sources",
]
if (enable_plugins) {
@@ -28,8 +55,7 @@ if (enable_plugins) {
if (is_component_build) {
shared_library("content") {
deps = content_shared_components + [
- "//content/app",
- "//content/public/app",
+ "//content/public/app:both_sources",
]
forward_dependent_configs_from = deps
}
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | content/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698