Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 declare_args() { | |
| 6 # By default, there is no go build tool, because go builds are not supported. | |
| 7 go_build_tool = "" | |
| 8 } | |
| 9 | |
| 10 template("go_test_binary") { | |
| 11 # Only available on linux for now. | |
| 12 assert(is_linux) | |
| 13 assert(defined(invoker.sources)) | |
| 14 # assert(defined(invoker.go_base_module)) | |
| 15 assert(go_build_tool != "") | |
| 16 | |
| 17 if (go_build_tool != "") { | |
| 18 action(target_name) { | |
| 19 script = "//build/go/go.py" | |
|
qsr
2014/09/15 09:54:24
If you really cannot declare the target binary, th
brettw
2014/09/16 22:58:55
I don't understand what you're saying here.
tburkard
2014/09/17 12:06:45
That's what I'm doing, I am creating the _build di
| |
| 20 outputs = [ "${target_out_dir}/${target_name}" ] | |
| 21 build_dir = "${target_out_dir}/${target_name}_build" | |
| 22 args = [ | |
| 23 "${go_build_tool}", | |
|
brettw
2014/09/16 22:58:54
Can you comment about this rule what this go test
tburkard
2014/09/17 12:06:45
Explained why I am doing it this way in the commen
| |
| 24 rebase_path(build_dir, root_build_dir), | |
| 25 rebase_path(target_out_dir, root_build_dir) + "/${target_name}", | |
| 26 rebase_path("//", root_build_dir), | |
| 27 "-I" + rebase_path("//", "//"), | |
| 28 "-L" + rebase_path("//out/Release/lib", "//") + | |
| 29 " -lmojo_system_impl -lbase", | |
| 30 "test", "-c", | |
| 31 ] + rebase_path(invoker.sources, build_dir) | |
| 32 } | |
| 33 } | |
| 34 } | |
| OLD | NEW |