Expose ability to download network service impl in SDK.
Consumers of the Mojo SDK need to be able obtain the impl of the network
service that is associated with the version of the SDK. This CL moves infra for
downloading the network service under the SDK. It gates the usage of the
prebuilt network service via a variable in //build/module_args/mojo.gni,
similarly to how the usage of the prebuilt shell is gated.
Concretely, this CL does the following:
- Moves download_network_service.py to live in the SDK
- Changes the structure of //mojo/public/tools/prebuilt to have a subdir
for each downloaded artifact, with platform-specific subdirs underneath each
artifact's subdir
- Moves the definition of the copy_network_service target into
//mojo/public/tools/BUILD.gn and changes the structure of dependencies on
that target to be analogous to the structure of dependencies on the
copy_mojo_shell target
R=jamesr@chromium.org, ppi@chromium.org
Review URL: https://codereview.chromium.org/910763002
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni
index 7661c88..77ed4bb 100644
--- a/mojo/public/mojo_application.gni
+++ b/mojo/public/mojo_application.gni
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/module_args/mojo.gni")
import("mojo.gni")
import("mojo_sdk.gni")
@@ -68,22 +69,22 @@
libs = invoker.libs
}
- if (use_prebuilt_mojo_shell) {
- copy_mojo_shell =
- rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root)
- }
-
- # Copy the prebuilt mojo_shell if using it.
+ data_deps = []
if (defined(invoker.data_deps)) {
data_deps = invoker.data_deps
- if (use_prebuilt_mojo_shell) {
- data_deps += [ copy_mojo_shell ]
- }
- } else {
- if (use_prebuilt_mojo_shell) {
- data_deps = [ copy_mojo_shell ]
- }
}
+
+ # Copy any necessary prebuilt artifacts.
+ if (use_prebuilt_mojo_shell) {
+ data_deps +=
+ [ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ]
+ }
+ if (use_prebuilt_network_service) {
+ data_deps += [ rebase_path("mojo/public/tools:copy_network_service",
+ ".",
+ mojo_root) ]
+ }
+
deps = rebase_path([
"mojo/public/c/system",
"mojo/public/platform/native:system",