Index: third_party/mojo/src/mojo/public/tools/BUILD.gn |
diff --git a/third_party/mojo/src/mojo/public/tools/BUILD.gn b/third_party/mojo/src/mojo/public/tools/BUILD.gn |
index e03d1d311696c4b6c5205129bd940286a51137c1..b5cfcd49f6f1a1ff5d59af6c43586ca7f259c4f9 100644 |
--- a/third_party/mojo/src/mojo/public/tools/BUILD.gn |
+++ b/third_party/mojo/src/mojo/public/tools/BUILD.gn |
@@ -31,16 +31,26 @@ if (use_prebuilt_mojo_shell) { |
if (use_prebuilt_network_service) { |
copy("copy_network_service") { |
filename = "network_service.mojo" |
- if (is_android) { |
+ if (defined(prebuilt_network_service_location) && |
+ prebuilt_network_service_location != "") { |
sources = [ |
- "prebuilt/network_service/android-arm/$filename", |
+ "$prebuilt_network_service_location", |
] |
} else { |
- assert(is_linux) |
- sources = [ |
- "prebuilt/network_service/linux-x64/$filename", |
- ] |
+ if (is_android) { |
+ assert(cpu_arch == "arm", |
+ "Only arm version prebuilt netowrk_service.mojo is available.") |
+ sources = [ |
+ "prebuilt/network_service/android-arm/$filename", |
+ ] |
+ } else { |
+ assert(is_linux) |
+ sources = [ |
+ "prebuilt/network_service/linux-x64/$filename", |
+ ] |
+ } |
} |
+ |
outputs = [ |
"$root_out_dir/$filename", |
] |
@@ -63,3 +73,18 @@ if (use_prebuilt_network_service) { |
] |
} |
} |
+ |
+# This rule can be seen as a sort of adapter. This takes a dart framework |
+# loaded from Google Storage and then puts it in a rule which the |
+# "dart_package" template in mojo/public/dart/rules.gni can introspect on, |
+# accessing the 'label' and 'target_out_dir' variables. |
+if (use_dart_apptest_framework) { |
+ copy("dart_apptest_framework") { |
+ sources = [ |
+ "prebuilt/frameworks/apptest.dartzip", |
+ ] |
+ outputs = [ |
+ "$target_out_dir/dart_apptest_framework.dartzip", |
+ ] |
+ } |
+} |