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

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: fix go group 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
« no previous file with comments | « build/go/go.py ('k') | mojo/BUILD.gn » ('j') | mojo/go/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 action(target_name) {
18 script = "//build/go/go.py"
19 outputs = [ "${target_out_dir}/${target_name}" ]
20 # Since go test does not permit specifying an output directory or output
21 # binary name, we create a temporary build directory, and the python
22 # script will later identify the output, copy it to the target location,
23 # and clean up the temporary build directory.
24 build_dir = "${target_out_dir}/${target_name}_build"
25 args = [
26 "${go_build_tool}",
27 rebase_path(build_dir, root_build_dir),
28 rebase_path(target_out_dir, root_build_dir) + "/${target_name}",
29 rebase_path("//", root_build_dir),
30 "-I" + rebase_path("//", "//"),
31 "-L" + rebase_path("//out/Release/lib", "//") +
32 " -lmojo_system_impl -lbase",
33 "test", "-c",
34 ] + rebase_path(invoker.sources, build_dir)
35 }
36 }
OLDNEW
« no previous file with comments | « build/go/go.py ('k') | mojo/BUILD.gn » ('j') | mojo/go/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698