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

Unified Diff: mojo/go/rules.gni

Issue 1105443002: go: update go build rules (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/go/BUILD.gn ('k') | mojo/go/sample_app/README.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
+ ]
+ }
}
« no previous file with comments | « mojo/go/BUILD.gn ('k') | mojo/go/sample_app/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698