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

Side by Side Diff: build/symlink.gni

Issue 1516533002: GN: Add symlink rules for dump_syms, symupload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments 2 Created 5 years 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 | « breakpad/BUILD.gn ('k') | tools/android/forwarder2/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2015 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 # Creates a symlink.
6 # Args:
7 # source: Path to link to.
8 # output: Where to create the symlink.
9 template("symlink") {
10 action(target_name) {
11 forward_variables_from(invoker,
12 [
13 "deps",
14 "testonly",
15 "visibility",
16 ])
17 outputs = [
18 invoker.output,
19 ]
20 script = "//build/symlink.py"
21 args = [
22 "-f",
23 rebase_path(invoker.source, get_path_info(invoker.output, "dir")),
24 rebase_path(invoker.output, root_build_dir),
25 ]
26 }
27 }
28
29 # Creates a symlink from root_build_dir/target_name to |binary_label|. This rule
30 # is meant to be used within if (current_toolchain == default_toolchain) blocks
31 # and point to targets in the non-default toolchain.
32 # Note that for executables, using a copy (as opposed to a symlink) does not
33 # work when is_component_build=true, since dependent libraries are found via
34 # relative location.
35 #
36 # Args:
37 # binary_label: Target that builds the file to symlink to. e.g.:
38 # ":foo($host_toolchain)".
39 # output: Where to create the symlink (default="$root_out_dir/$target_name")
40 #
41 # Example:
42 # if (current_toolchain == host_toolchain) {
43 # executable("foo") { ... }
44 # } else if (current_toolchain == default_toolchain) {
45 # binary_symlink("foo") {
46 # binary_label = ":foo($host_toolchain)"
47 # }
48 # }
49 template("binary_symlink") {
50 symlink(target_name) {
51 forward_variables_from(invoker,
52 [
53 "output",
54 "testonly",
55 "visibility",
56 ])
57 deps = [
58 invoker.binary_label,
59 ]
60
61 _out_dir = get_label_info(invoker.binary_label, "root_out_dir")
62 source = "$_out_dir/" + get_label_info(invoker.binary_label, "name")
63
64 if (!defined(output)) {
65 output = "$root_out_dir/${invoker.target_name}"
66 }
67 }
68 }
OLDNEW
« no previous file with comments | « breakpad/BUILD.gn ('k') | tools/android/forwarder2/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698