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

Side by Side Diff: mojo/runner/BUILD.gn

Issue 1630823002: Move mojo/runner to mojo/shell/standalone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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 | « mojo/public/mojo_application.gni ('k') | mojo/runner/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//mojo/public/mojo_application.gni")
6 import("//mojo/public/tools/bindings/mojom.gni")
7 import("//testing/test.gni")
8
9 group("runner") {
10 testonly = true
11
12 deps = [
13 ":mojo_runner",
14 ]
15 }
16
17 if (is_android) {
18 import("//build/config/android/config.gni")
19 import("//build/config/android/rules.gni")
20 }
21
22 source_set("register_local_aliases_fwd") {
23 sources = [
24 "register_local_aliases.h",
25 ]
26 }
27
28 source_set("mojo_runner_lib") {
29 sources = []
30
31 deps = [
32 ":lib",
33 "//base",
34 "//build/config/sanitizers:deps",
35 "//mojo/common",
36 "//mojo/environment:chromium",
37 "//mojo/message_pump",
38 "//mojo/shell/runner/host:lib",
39 "//mojo/shell/runner/host:switches",
40 ]
41
42 if (!is_android) {
43 sources += [
44 "desktop/main.cc",
45 "register_local_aliases.cc",
46 "register_local_aliases.h",
47 ]
48 deps += [
49 "//components/tracing:startup_tracing",
50 "//third_party/icu:icudata",
51 ]
52 } else {
53 sources += [
54 "android/context_init.h",
55 "android/library_loader.cc",
56 "android/main.cc",
57 "android/main.h",
58 ]
59
60 deps += [
61 ":jni_headers",
62 "//components/mus",
63 "//components/mus/ws:lib",
64 "//mojo/shell",
65 "//ui/gl",
66 "//ui/platform_window/android",
67 ]
68 }
69 }
70
71 executable("mojo_runner") {
72 deps = [
73 ":mojo_runner_lib",
74 "//build/config/sanitizers:deps",
75 ]
76
77 if (is_android) {
78 sources = [
79 "android/context_init.cc",
80 "register_local_aliases.cc",
81 ]
82
83 deps += [
84 ":lib",
85 ":register_local_aliases_fwd",
86 "//third_party/mojo/src/mojo/edk/system",
87 ]
88
89 # On android, the executable is also the native library used by the apk.
90 # It means dynamic symbols must be preserved and exported.
91 ldflags = [ "-Wl,--export-dynamic" ]
92 }
93 }
94
95 source_set("lib") {
96 sources = [
97 "context.cc",
98 "context.h",
99 "scoped_user_data_dir.cc",
100 "scoped_user_data_dir.h",
101 "task_runners.cc",
102 "task_runners.h",
103 "tracer.cc",
104 "tracer.h",
105 ]
106
107 deps = [
108 "//base",
109 "//base:base_static",
110 "//base/third_party/dynamic_annotations",
111 "//components/devtools_service/public/cpp",
112 "//components/devtools_service/public/interfaces",
113 "//components/tracing:startup_tracing",
114 "//mojo/message_pump",
115 "//mojo/services/network/public/interfaces",
116 "//mojo/services/tracing/public/cpp",
117 "//mojo/services/tracing/public/interfaces",
118 "//mojo/shell",
119 "//mojo/shell/package_manager",
120 "//mojo/shell/public/cpp",
121 "//mojo/shell/runner:init",
122 "//mojo/shell/runner/child:interfaces",
123 "//mojo/shell/runner/host:lib",
124 "//mojo/util:filename_util",
125 "//third_party/mojo/src/mojo/edk/system",
126 "//ui/gl",
127 "//url",
128 ]
129
130 public_deps = [
131 ":switches",
132 "//mojo/shell",
133 "//mojo/shell/runner:init",
134 ]
135
136 if (!is_component_build) {
137 data_deps = [
138 "//components/devtools_service",
139 "//mojo/services/tracing",
140 ]
141 }
142
143 if (is_android) {
144 sources += [
145 "android/android_handler.cc",
146 "android/android_handler.h",
147 "android/android_handler_loader.cc",
148 "android/android_handler_loader.h",
149 "android/background_application_loader.cc",
150 "android/background_application_loader.h",
151 "android/ui_application_loader_android.cc",
152 "android/ui_application_loader_android.h",
153 ]
154
155 deps += [
156 ":jni_headers",
157 ":run_android_application_function",
158 "//components/mus/gles2",
159 "//mojo/shell/public/cpp:content_handler",
160 ]
161 } else {
162 sources += [
163 "desktop/launcher_process.cc",
164 "desktop/launcher_process.h",
165 "desktop/main_helper.cc",
166 "desktop/main_helper.h",
167 ]
168 }
169
170 # This target includes some files behind #ifdef OS... guards. Since gn is not
171 # smart enough to understand preprocess includes, it does complains about
172 # these includes when not using the build files for that OS. Suppress checking
173 # so we can enable checking for the rest of the targets in this file.
174 # TODO: Might be better to split the files with OS-specific includes out to a
175 # separate source_set so we can leave checking on for the rest of the target.
176 check_includes = false
177 }
178
179 source_set("switches") {
180 sources = [
181 "switches.cc",
182 "switches.h",
183 ]
184
185 deps = [
186 "//base",
187 ]
188 }
189
190 if (is_android) {
191 generate_jni("jni_headers") {
192 sources = [
193 "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java",
194 "android/apk/src/org/chromium/mojo/shell/Bootstrap.java",
195 "android/apk/src/org/chromium/mojo/shell/ShellMain.java",
196 ]
197 jni_package = "mojo/shell"
198 }
199
200 android_library("bootstrap_java") {
201 java_files = [ "android/apk/src/org/chromium/mojo/shell/Bootstrap.java" ]
202
203 deps = [
204 "//base:base_java",
205 ]
206
207 dex_path = "$target_out_dir/bootstrap_java.dex.jar"
208 }
209
210 shared_library("bootstrap") {
211 sources = [
212 "android/bootstrap.cc",
213 "register_local_aliases.cc",
214 "register_local_aliases.h",
215 ]
216 deps = [
217 ":jni_headers",
218 ":lib",
219 ":run_android_application_function",
220 "//base",
221 "//build/config/sanitizers:deps",
222 ]
223 }
224
225 # Shared header between the bootstrap and the main shell .so.
226 source_set("run_android_application_function") {
227 sources = [
228 "android/run_android_application_function.h",
229 ]
230
231 deps = [
232 "//base",
233 ]
234 }
235
236 android_library("java") {
237 java_files = [
238 "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java",
239 "android/apk/src/org/chromium/mojo/shell/FileHelper.java",
240 "android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java",
241 "android/apk/src/org/chromium/mojo/shell/MojoShellApplication.java",
242 "android/apk/src/org/chromium/mojo/shell/ShellMain.java",
243 ]
244
245 deps = [
246 ":resources",
247 "//base:base_java",
248 ]
249 }
250
251 android_resources("resources") {
252 resource_dirs = [ "android/apk/res" ]
253 custom_package = "org.chromium.mojo.shell"
254 }
255
256 android_assets("android_assets") {
257 deps = [
258 ":bootstrap",
259 ":bootstrap_java",
260 ]
261 sources = [
262 "$root_out_dir/obj/mojo/runner/bootstrap_java.dex.jar",
263 "$root_shlib_dir/${shlib_prefix}bootstrap$shlib_extension",
264 ]
265 }
266
267 android_assets("mojo_runner_apptests_assets") {
268 testonly = true
269 deps = [
270 ":android_assets",
271 "//components/clipboard:apptests_assets",
272 "//components/clipboard:clipboard_assets",
273 "//components/mus/ws:apptests_assets",
274 "//components/resource_provider:apptests_assets",
275 "//components/resource_provider:resource_provider_assets",
276 "//mojo/services/network:apptests_assets",
277 "//mojo/services/network:network_assets",
278 "//third_party/icu:icu_assets",
279 ]
280 }
281
282 copy("copy_mojo_runner") {
283 sources = [
284 "$root_out_dir/mojo_runner",
285 ]
286 outputs = [
287 "$root_shlib_dir/${shlib_prefix}mojo_runner$shlib_extension",
288 ]
289 deps = [
290 ":mojo_runner",
291 ]
292 }
293
294 android_apk("mojo_runner_apptests_apk") {
295 testonly = true
296 apk_name = "MojoRunnerApptests"
297 android_manifest = "android/apk/AndroidManifest.xml"
298 native_libs = [ "${shlib_prefix}mojo_runner$shlib_extension" ]
299 write_asset_list = true
300
301 deps = [
302 ":copy_mojo_runner",
303 ":java",
304 ":mojo_runner_apptests_assets",
305 ":resources",
306 "//base:base_java",
307 "//ui/platform_window/android:platform_window_java",
308 google_play_services_resources,
309 ]
310 }
311 }
OLDNEW
« no previous file with comments | « mojo/public/mojo_application.gni ('k') | mojo/runner/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698