Index: mojo/go/rules.gni |
diff --git a/mojo/go/rules.gni b/mojo/go/rules.gni |
index a3daafed3f937709afce81ac25d2b5b646060e50..40047b775845e1357ffce24c587139835eaaec18 100644 |
--- a/mojo/go/rules.gni |
+++ b/mojo/go/rules.gni |
@@ -91,22 +91,22 @@ template("go_test_binary") { |
} |
} |
-template("go_shared_library") { |
+template("go_mojo_application") { |
# Only available on android for now. |
assert(is_android) |
assert(defined(invoker.sources)) |
assert(go_build_tool != "") |
static_library_name = target_name + "_static_library" |
- |
static_library(static_library_name) { |
complete_static_lib = true |
deps = invoker.deps |
} |
- action(target_name) { |
+ go_library_name = target_name + "_go" |
+ action(go_library_name) { |
deps = [ |
- ":$static_library_name", |
+ ":${static_library_name}", |
] |
script = "//mojo/go/go.py" |
inputs = invoker.sources |
@@ -134,4 +134,16 @@ template("go_shared_library") { |
"-ldflags=-shared", |
] + rebase_path(invoker.sources, build_dir) |
} |
+ |
+ copy(target_name) { |
+ deps = [ |
+ ":${go_library_name}", |
+ ] |
+ sources = [ |
+ "${target_out_dir}/${go_library_name}", |
+ ] |
+ outputs = [ |
+ "${root_out_dir}/${target_name}.mojo", |
+ ] |
+ } |
} |