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 declare_args() { | 8 declare_args() { |
9 # Enable Link Time Optimization in optimized builds (output programs run | 9 # Enable Link Time Optimization in optimized builds (output programs run |
10 # faster, but linking is up to 5-20x slower). | 10 # faster, but linking is up to 5-20x slower). |
11 # | 11 # |
12 # TODO(pcc): Remove this flag if/when LTO is enabled in official builds. | 12 # TODO(pcc): Remove this flag if/when LTO is enabled in official builds. |
13 allow_posix_link_time_opt = false | 13 allow_posix_link_time_opt = false |
14 | 14 |
15 # Set to true to use lld, the LLVM linker. This flag may be used on Windows | 15 # Set to true to use lld, the LLVM linker. This flag may be used on Windows |
16 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree | 16 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree |
17 # LLVM toolchain (see llvm_force_head_revision in | 17 # LLVM toolchain (see llvm_force_head_revision in |
18 # build/config/compiler/BUILD.gn). | 18 # build/config/compiler/BUILD.gn). |
19 use_lld = false | 19 use_lld = false |
20 | |
21 # Clang compiler version. Clang files are placed at version-dependent paths. | |
brettw
2016/05/03 18:03:25
I was thinking:
declare_args() {
...
if
aizatsky
2016/05/03 18:07:31
Done. I didn't know conditionals are allowed in de
| |
22 # It is set to a specific value below only when is_clang==true. | |
23 clang_version = "undefined" | |
24 } | |
25 | |
26 if (is_clang) { | |
27 clang_version = "3.9.0" | |
20 } | 28 } |
21 | 29 |
22 # Subdirectory within root_out_dir for shared library files. | 30 # Subdirectory within root_out_dir for shared library files. |
23 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work | 31 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work |
24 # in GN until support for loadable_module() is added. | 32 # in GN until support for loadable_module() is added. |
25 # See: https://codereview.chromium.org/1236503002/ | 33 # See: https://codereview.chromium.org/1236503002/ |
26 shlib_subdir = "." | 34 shlib_subdir = "." |
27 | 35 |
28 # Root out dir for shared library files. | 36 # Root out dir for shared library files. |
29 root_shlib_dir = root_out_dir | 37 root_shlib_dir = root_out_dir |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 stamp_description = "STAMP {{output}}" | 70 stamp_description = "STAMP {{output}}" |
63 copy_description = "COPY {{source}} {{output}}" | 71 copy_description = "COPY {{source}} {{output}}" |
64 if (host_os == "win") { | 72 if (host_os == "win") { |
65 stamp_command = "$python_path gyp-win-tool stamp {{output}}" | 73 stamp_command = "$python_path gyp-win-tool stamp {{output}}" |
66 copy_command = | 74 copy_command = |
67 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" | 75 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" |
68 } else { | 76 } else { |
69 stamp_command = "touch {{output}}" | 77 stamp_command = "touch {{output}}" |
70 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" | 78 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" |
71 } | 79 } |
OLD | NEW |