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

Side by Side Diff: build/go/rules.gni

Issue 556813003: Add Go build support for GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698