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

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

Issue 647573004: -Add README for building go sample application (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: README modifications. Created 6 years, 1 month 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 | « no previous file | mojo/go/sample_app/README.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 # By default, there is no go build tool, because go builds are not supported. 6 # By default, there is no go build tool, because go builds are not supported.
7 go_build_tool = "" 7 go_build_tool = ""
8 } 8 }
9 9
10 # Declare a go test binary target. 10 # Declare a go test binary target.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 # and clean up the temporary build directory. 46 # and clean up the temporary build directory.
47 build_dir = "${target_out_dir}/${target_name}_build" 47 build_dir = "${target_out_dir}/${target_name}_build"
48 args = [ 48 args = [
49 "--", 49 "--",
50 "${go_build_tool}", 50 "${go_build_tool}",
51 rebase_path(build_dir, root_build_dir), 51 rebase_path(build_dir, root_build_dir),
52 rebase_path(target_out_dir, root_build_dir) + "/${target_name}", 52 rebase_path(target_out_dir, root_build_dir) + "/${target_name}",
53 rebase_path("//", root_build_dir), 53 rebase_path("//", root_build_dir),
54 "-I" + rebase_path("//"), 54 "-I" + rebase_path("//"),
55 " -L" + rebase_path(target_out_dir) + 55 " -L" + rebase_path(target_out_dir) +
56 " -L" + rebase_path(root_build_dir + "/obj/third_party/libevent") +
57 " -l" + static_library_name + 56 " -l" + static_library_name +
58 " -lstdc++ -lpthread -lm -lglib-2.0 -levent", 57 " -lstdc++ -lpthread -lm -lglib-2.0",
59 "test", "-c", 58 "test", "-c",
60 ] + rebase_path(invoker.sources, build_dir) 59 ] + rebase_path(invoker.sources, build_dir)
61 } 60 }
62 } 61 }
63 62
64 template("go_shared_library") { 63 template("go_shared_library") {
65 # Only available on android for now. 64 # Only available on android for now.
66 assert(is_android) 65 assert(is_android)
67 assert(defined(invoker.sources)) 66 assert(defined(invoker.sources))
68 assert(go_build_tool != "") 67 assert(go_build_tool != "")
(...skipping 20 matching lines...) Expand all
89 rebase_path(build_dir, root_build_dir), 88 rebase_path(build_dir, root_build_dir),
90 rebase_path(target_out_dir, root_build_dir) + "/${target_name}", 89 rebase_path(target_out_dir, root_build_dir) + "/${target_name}",
91 rebase_path("//", root_build_dir), 90 rebase_path("//", root_build_dir),
92 "-I" + rebase_path("//"), 91 "-I" + rebase_path("//"),
93 " -L" + rebase_path(target_out_dir) + 92 " -L" + rebase_path(target_out_dir) +
94 " -l" + static_library_name + "", 93 " -l" + static_library_name + "",
95 "build -ldflags=-shared", 94 "build -ldflags=-shared",
96 ] + rebase_path(invoker.sources, build_dir) 95 ] + rebase_path(invoker.sources, build_dir)
97 } 96 }
98 } 97 }
OLDNEW
« no previous file with comments | « no previous file | mojo/go/sample_app/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698