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

Side by Side Diff: build/toolchain/toolchain.gni

Issue 1412623007: GN: Factor "stamp" and "copy" details out of toolchains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « build/toolchain/mac/BUILD.gn ('k') | build/toolchain/win/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
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 # Subdirectory within root_out_dir for shared library files. 8 # Subdirectory within root_out_dir for shared library files.
9 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work 9 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work
10 # in GN until support for loadable_module() is added. 10 # in GN until support for loadable_module() is added.
(...skipping 20 matching lines...) Expand all
31 } else { 31 } else {
32 assert(false, "Platform not supported") 32 assert(false, "Platform not supported")
33 } 33 }
34 34
35 # Prefix for shared library files. 35 # Prefix for shared library files.
36 if (is_posix) { 36 if (is_posix) {
37 shlib_prefix = "lib" 37 shlib_prefix = "lib"
38 } else { 38 } else {
39 shlib_prefix = "" 39 shlib_prefix = ""
40 } 40 }
41
42 # While other "tool"s in a toolchain are specific to the target of that
43 # toolchain, the "stamp" and "copy" tools are really generic to the host;
44 # but each toolchain must define them separately. GN doesn't allow a
45 # template instantiation inside a toolchain definition, so some boilerplate
46 # has to be repeated in each toolchain to define these two tools. These
47 # four variables reduce the duplication in that boilerplate.
48 stamp_description = "STAMP {{output}}"
49 copy_description = "COPY {{source}} {{output}}"
50 if (host_os == "win") {
51 stamp_command = "$python_path gyp-win-tool stamp {{output}}"
52 copy_command =
53 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}"
54 } else {
55 stamp_command = "touch {{output}}"
56 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
57 }
OLDNEW
« no previous file with comments | « build/toolchain/mac/BUILD.gn ('k') | build/toolchain/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698