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

Side by Side Diff: content/public/app/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 unified diff | Download patch
« no previous file with comments | « content/ppapi_plugin/BUILD.gn ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Used internally to hold the sources shared between the various targets below. 5 # App different than the regular content subcomponents (see comments in
6 source_set("app_shared_sources") { 6 # //content/BUILD.gn) because it has to support the browser/child process split
7 # content_main_delegate.cc has ifdefs that depend on whether the file is 7 # (the "both" target include both browser and child process files and is used
8 # being used in the context of the browser or child process. So that file has 8 # for testing).
9 # to be included in the per-type targets below rather than in this shared one. 9 #
10 sources = [ 10 # In non-component mode, browser, child, and both all follow the same structure:
11 "android_library_loader_hooks.h", 11 # foo ->
12 "content_main.h", 12 # //content/public/app:child (group) ->
13 "content_main_runner.h", 13 # //content/public/app:child_sources (source set) ->
14 "startup_helper_win.h", 14 # //content/app:child (source set)
15 ]
16 15
17 configs += [ "//content:content_implementation" ] 16 # In component mode, content is linked as one big turd so there is only one
17 # app target containing sources ("both") and the other ones forward to it:
18 # foo ->
19 # //content/public/app:child (group; "browser" and "both" ones look the same)
20 # //content (shared library) ->
21 # //content/public/app:both_sources (source set)
18 22
19 deps = [ 23 public_app_shared_sources = [
20 "//base", 24 "android_library_loader_hooks.h",
21 "//base:i18n", 25 "content_main.h",
22 "//content:export", 26 "content_main_delegate.cc",
23 "//content/common", 27 "content_main_delegate.h",
24 "//content/public/plugin", 28 "content_main_runner.h",
25 "//content/public/renderer", 29 "startup_helper_win.h",
26 "//content/public/utility", 30 ]
27 ]
28 }
29 31
30 # The structure of this is like the private content/app implementation. 32 public_app_shared_deps = [
33 "//base",
34 "//base:i18n",
35 "//content:export",
36 "//content/public/common:common_sources",
37 ]
38
31 if (is_component_build) { 39 if (is_component_build) {
32 40
33 source_set("app") { 41 source_set("both_sources") {
34 sources = [ 42 # Only the main content shared library can pull this in.
35 "content_main_delegate.cc", 43 visibility = [ "//content:content" ]
36 "content_main_delegate.h",
37 ]
38 44
39 deps = [ 45 sources = public_app_shared_sources
40 ":app_shared_sources", 46
41 "//content/app", 47 configs += [ "//content:content_implementation" ]
42 "//content/common", 48
43 "//content/public/browser", 49 deps = public_app_shared_deps + [
50 "//content/app:both",
51 "//content/public/browser:browser_sources",
44 ] 52 ]
45 } 53 }
54
55 # These all just forward to content, which in turn depends on "both_sources".
46 group("browser") { 56 group("browser") {
47 deps = [ "//content" ] 57 deps = [ "//content" ]
48 } 58 }
49 group("child") { 59 group("child") {
50 deps = [ "//content" ] 60 deps = [ "//content" ]
51 } 61 }
52 group("both") { 62 group("both") {
53 deps = [ "//content" ] 63 deps = [ "//content" ]
54 } 64 }
55 65
56 } else { 66 } else {
57 67
58 source_set("browser") { 68 # content_main_delegate.cc conditionally includes content_browser_client.h
59 # See comment in "child" target. 69 # from //content/public/browser when it's not the child build. However,
60 check_includes = false 70 # the header checker doesn't know this doesn't apply and throws an error.
61 sources = [ 71 # So all of these targets set check_includes = false.
62 "content_main_delegate.cc", 72 #
63 "content_main_delegate.h", 73 # TODO(brettw) either teach the header checker to understand simple
64 ] 74 # ifdefs or split the file apart so we can enable header checking here.
65 deps = [ 75 # Furthermore, since this file exists in more than one target, they all
66 ":app_shared_sources", 76 # have to opt-out of header checking (a file is checked once for all
67 "//content/app:browser", 77 # targets using a source file).
68 "//content/public/browser",
69 "//content/public/common",
70 ]
71 }
72 source_set("child") {
73 # content_main_delegate.cc conditionally includes content_browser_client.h
74 # from //content/public/browser when it's not the child build. However,
75 # the header checker doesn't know this doesn't apply and throws an error.
76 #
77 # TODO(brettw) either teach the header checker to understand simple
78 # ifdefs or split the file apart so we can enable header checking here.
79 # Furthermore, since this file exists in more than one target, they all
80 # have to opt-out of header checking (a file is checked once for all
81 # targets using a source file).
82 check_includes = false
83 78
84 sources = [
85 "content_main_delegate.cc",
86 "content_main_delegate.h",
87 ]
88 deps = [
89 ":app_shared_sources",
90 "//content/app:child",
91 "//content/public/common",
92 ]
93 }
94 source_set("both") { 79 source_set("both") {
95 # See comment in "child" target. 80 check_includes = false # See comment above.
96 check_includes = false 81
97 sources = [ 82 sources = public_app_shared_sources
98 "content_main_delegate.cc", 83 configs += [ "//content:content_implementation" ]
99 "content_main_delegate.h", 84 deps = public_app_shared_deps + [
100 ]
101 deps = [
102 ":app_shared_sources",
103 "//content/app:both", 85 "//content/app:both",
104 "//content/public/browser", 86 "//content/public/browser",
105 "//content/public/common", 87 "//content/public/common",
106 ] 88 ]
107 } 89 }
108 90
91 # TODO(GYP) enable chrome_multiple_dll support
92 is_chrome_multiple_dll = false
93
94 if (is_chrome_multiple_dll) {
95 source_set("browser") {
96 check_includes = false # See comment above.
97
98 sources = public_app_shared_sources
99
100 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
101 configs += [ "//content:content_implementation" ]
102
103 deps = public_app_shared_deps + [
104 "//content/app:browser",
105 "//content/public/browser",
106 "//content/public/common",
107 ]
108 }
109
110 source_set("child") {
111 check_includes = false # See comment above.
112
113 sources = public_app_shared_sources
114
115 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
116 configs += [ "//content:content_implementation" ]
117
118 deps = public_app_shared_deps + [
119 "//content/app:child",
120 "//content/public/common",
121 ]
122 }
123 } else {
124 # When the multi-DLL build is disabled, there is only one type of the
125 # "app" target, and "browser" and "child" are the same as "both".
126 group("browser") {
127 deps = [ ":both" ]
128 }
129 group("child") {
130 deps = [ ":both" ]
131 }
132 }
133
109 } 134 }
OLDNEW
« no previous file with comments | « content/ppapi_plugin/BUILD.gn ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698