OLD | NEW |
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 # Toolchain-related configuration that may be needed outside the context of the | 5 # Toolchain-related configuration that may be needed outside the context of the |
6 # toolchain() rules themselves. | 6 # toolchain() rules themselves. |
7 | 7 |
8 import("//build/config/chrome_build.gni") | 8 import("//build/config/chrome_build.gni") |
9 | 9 |
10 declare_args() { | 10 declare_args() { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 # While other "tool"s in a toolchain are specific to the target of that | 86 # While other "tool"s in a toolchain are specific to the target of that |
87 # toolchain, the "stamp" and "copy" tools are really generic to the host; | 87 # toolchain, the "stamp" and "copy" tools are really generic to the host; |
88 # but each toolchain must define them separately. GN doesn't allow a | 88 # but each toolchain must define them separately. GN doesn't allow a |
89 # template instantiation inside a toolchain definition, so some boilerplate | 89 # template instantiation inside a toolchain definition, so some boilerplate |
90 # has to be repeated in each toolchain to define these two tools. These | 90 # has to be repeated in each toolchain to define these two tools. These |
91 # four variables reduce the duplication in that boilerplate. | 91 # four variables reduce the duplication in that boilerplate. |
92 stamp_description = "STAMP {{output}}" | 92 stamp_description = "STAMP {{output}}" |
93 copy_description = "COPY {{source}} {{output}}" | 93 copy_description = "COPY {{source}} {{output}}" |
94 if (host_os == "win") { | 94 if (host_os == "win") { |
95 stamp_command = "$python_path gyp-win-tool stamp {{output}}" | 95 _tool_wrapper_path = |
| 96 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) |
| 97 |
| 98 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" |
96 copy_command = | 99 copy_command = |
97 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" | 100 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" |
98 } else { | 101 } else { |
99 stamp_command = "touch {{output}}" | 102 stamp_command = "touch {{output}}" |
100 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" | 103 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" |
101 } | 104 } |
OLD | NEW |