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

Side by Side Diff: build/symlink.gni

Issue 2348493005: Revert of Use a stamp file when symlinking in GN work around mtime issues (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 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 # Creates a symlink. 5 # Creates a symlink.
6 # Args: 6 # Args:
7 # source: Path to link to. 7 # source: Path to link to.
8 # output: Where to create the symlink. 8 # output: Where to create the symlink.
9 template("symlink") { 9 template("symlink") {
10 action(target_name) { 10 action(target_name) {
11 forward_variables_from(invoker, 11 forward_variables_from(invoker,
12 [ 12 [
13 "deps", 13 "deps",
14 "testonly", 14 "testonly",
15 "visibility", 15 "visibility",
16 ]) 16 ])
17
18 # Can't use the symlink itself as an output since ninja does not properly
19 # process the symlink's mtime.
20 # https://github.com/ninja-build/ninja/issues/1186
21 outputs = [ 17 outputs = [
22 "$target_gen_dir/$target_name.stamp", 18 invoker.output,
23 ] 19 ]
24 script = "//build/symlink.py" 20 script = "//build/symlink.py"
25 args = [ 21 args = [
26 "--touch",
27 rebase_path(outputs[0], root_build_dir),
28 "-f", 22 "-f",
29 rebase_path(invoker.source, get_path_info(invoker.output, "dir")), 23 rebase_path(invoker.source, get_path_info(invoker.output, "dir")),
30 rebase_path(invoker.output, root_build_dir), 24 rebase_path(invoker.output, root_build_dir),
31 ] 25 ]
32 } 26 }
33 } 27 }
34 28
35 # Creates a symlink from root_build_dir/target_name to |binary_label|. This rule 29 # Creates a symlink from root_build_dir/target_name to |binary_label|. This rule
36 # is meant to be used within if (current_toolchain == default_toolchain) blocks 30 # is meant to be used within if (current_toolchain == default_toolchain) blocks
37 # and point to targets in the non-default toolchain. 31 # and point to targets in the non-default toolchain.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 69 }
76 source = "$_out_dir/$_name" 70 source = "$_out_dir/$_name"
77 71
78 _output_name = _name 72 _output_name = _name
79 if (defined(invoker.output_name)) { 73 if (defined(invoker.output_name)) {
80 _output_name = invoker.output_name 74 _output_name = invoker.output_name
81 } 75 }
82 output = "$root_out_dir/$_output_name" 76 output = "$root_out_dir/$_output_name"
83 } 77 }
84 } 78 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698