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

Unified Diff: mojo/runner/BUILD.gn

Issue 1130763004: Gets mandoline working on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years, 7 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/generate_mojo_shell_assets_list.gni ('k') | mojo/runner/android/apk/AndroidManifest.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/BUILD.gn
diff --git a/mojo/runner/BUILD.gn b/mojo/runner/BUILD.gn
index db9ac617b36adc471f32798c0a69e1e6b2dcfb2a..5d78611e1864928cc604237eebc7c6d6ded5d2af 100644
--- a/mojo/runner/BUILD.gn
+++ b/mojo/runner/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//mojo/generate_mojo_shell_assets_list.gni")
import("//third_party/mojo/src/mojo/public/mojo.gni")
import("//third_party/mojo/src/mojo/public/mojo_application.gni")
import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
@@ -29,7 +30,7 @@ if (is_android) {
import("//build/config/android/rules.gni")
}
-executable("mojo_runner") {
+source_set("mojo_runner_lib") {
sources = []
deps = [
@@ -48,15 +49,12 @@ executable("mojo_runner") {
]
} else {
sources += [
+ "android/context_init.h",
"android/library_loader.cc",
"android/main.cc",
"android/main.h",
]
- # On android, the executable is also the native library used by the apk.
- # It means dynamic symbols must be preserved and exported.
- ldflags = [ "-Wl,--export-dynamic" ]
-
deps += [
":jni_headers",
"//components/native_viewport:lib",
@@ -66,6 +64,22 @@ executable("mojo_runner") {
}
}
+executable("mojo_runner") {
+ deps = [
+ ":mojo_runner_lib",
+ ]
+
+ if (is_android) {
+ sources = [
+ "android/context_init.cc",
+ ]
+
+ # On android, the executable is also the native library used by the apk.
+ # It means dynamic symbols must be preserved and exported.
+ ldflags = [ "-Wl,--export-dynamic" ]
+ }
+}
+
source_set("in_process_native_runner") {
sources = [
"in_process_native_runner.cc",
@@ -250,6 +264,7 @@ if (is_android) {
]
deps = [
+ ":resources",
"//base:base_java",
]
}
@@ -265,6 +280,9 @@ if (is_android) {
copy_ex("copy_mojo_runner_assets") {
clear_dir = true
dest = mojo_runner_assets_dir
+ deps = [
+ ":copy_mojo_runner",
+ ]
sources = [
"$root_out_dir/lib.stripped/libbootstrap.so",
"$root_out_dir/network_service.mojo",
@@ -272,6 +290,13 @@ if (is_android) {
]
}
+ generate_mojo_shell_assets_list("build_mojo_runner_assets") {
+ deps = [
+ ":copy_mojo_runner_assets",
+ ]
+ dir = mojo_runner_assets_dir
+ }
+
copy("copy_mojo_runner") {
sources = [
"$root_out_dir/exe.stripped/mojo_runner",
@@ -300,8 +325,7 @@ if (is_android) {
asset_location = mojo_runner_assets_dir
deps = [
- ":copy_mojo_runner",
- ":copy_mojo_runner_assets",
+ ":build_mojo_runner_assets",
":java",
":resources",
"//base:base_java",
@@ -310,6 +334,13 @@ if (is_android) {
]
}
+ generate_mojo_shell_assets_list("build_mojo_runner_test_assets") {
+ deps = [
+ ":copy_mojo_runner_test_assets",
+ ]
+ dir = mojo_runner_test_assets_dir
+ }
+
android_library("mojo_runner_tests_java") {
java_files =
[ "android/tests/src/org/chromium/mojo/shell/ShellTestBase.java" ]
@@ -374,7 +405,7 @@ test("tests") {
deps += [ ":jni_headers" ]
apk_deps = [
- ":copy_mojo_runner_test_assets",
+ ":build_mojo_runner_test_assets",
":mojo_runner_tests_java",
]
« no previous file with comments | « mojo/generate_mojo_shell_assets_list.gni ('k') | mojo/runner/android/apk/AndroidManifest.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698