Index: shell/BUILD.gn |
diff --git a/shell/BUILD.gn b/shell/BUILD.gn |
index ad22157896047ed298840c5c4fa0466cad987a5e..711ff6fb6219d0716b8d08de949187efc4da29f4 100644 |
--- a/shell/BUILD.gn |
+++ b/shell/BUILD.gn |
@@ -46,9 +46,7 @@ if (is_android) { |
if (!mojo_use_prebuilt_mojo_shell) { |
executable("mojo_shell") { |
- sources = [ |
- "desktop/main.cc", |
- ] |
+ sources = [] |
deps = [ |
":init", |
@@ -60,7 +58,11 @@ if (!mojo_use_prebuilt_mojo_shell) { |
"//mojo/environment:chromium", |
] |
- if (is_android) { |
+ data_deps = [ ":mojo_shell_child" ] |
+ |
+ if (!is_android) { |
+ sources += [ "desktop/main.cc" ] |
+ } else { |
sources += [ |
"android/library_loader.cc", |
"android/main.cc", |
@@ -79,6 +81,26 @@ if (!mojo_use_prebuilt_mojo_shell) { |
] |
} |
} |
+ |
+ executable("mojo_shell_child") { |
+ sources = [ |
+ "child_main.cc", |
+ ] |
+ |
+ deps = [ |
+ # TODO(vtl): Reduce these dependencies (probably mostly in :lib). |
+ ":child_controller_bindings", |
+ ":init", |
+ ":lib", |
+ ":native_application_support", |
+ "//base", |
+ "//base/allocator", |
+ "//build/config/sanitizers:deps", |
+ "//mojo/common", |
+ "//mojo/edk/system", |
+ "//mojo/environment:chromium", |
+ ] |
+ } |
} # !mojo_use_prebuilt_mojo_shell |
executable("mojo_launcher") { |
@@ -129,8 +151,6 @@ source_set("in_process_native_runner") { |
source_set("lib") { |
sources = [ |
- "child_main.cc", |
- "child_main.h", |
"child_process_host.cc", |
"child_process_host.h", |
"command_line_util.cc", |
@@ -319,6 +339,7 @@ if (is_android) { |
clear_dir = true |
dest = mojo_shell_assets_dir |
sources = [ |
+ "$root_out_dir/exe.stripped/mojo_shell_child", |
"$root_out_dir/lib.stripped/libbootstrap.so", |
"$root_out_dir/network_service.mojo", |
"$root_out_dir/obj/shell/bootstrap_java.dex.jar", |
@@ -412,7 +433,6 @@ source_set("external_application_registrar_connection") { |
] |
} |
-# GYP version: mojo/mojo.gyp:mojo_shell_tests |
test("mojo_shell_tests") { |
sources = [ |
"child_process_host_unittest.cc", |
@@ -445,7 +465,8 @@ test("mojo_shell_tests") { |
"//shell/application_manager", |
] |
- datadeps = [ |
+ data_deps = [ |
+ ":mojo_shell_child", |
"//services/test_service:test_app", |
"//services/test_service:test_request_tracker_app", |
] |
@@ -464,7 +485,6 @@ test("mojo_shell_tests") { |
} |
} |
-# GYP version: mojo/mojo.gyp:mojo_shell_test_support |
source_set("test_support") { |
sources = [ |
"shell_test_helper.cc", |