OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2016 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 # This file should only be imported from files that define toolchains. | |
6 # There's no way to enforce this exactly, but all toolchains are processed | |
7 # in the context of the default_toolchain, so we can at least check for that. | |
8 | |
brettw
2016/06/06 17:33:38
Can you delete this blank line so that it's clear
Dirk Pranke
2016/06/06 22:16:12
Acknowledged.
| |
9 assert(current_toolchain == default_toolchain) | |
10 | |
11 import("//build/config/sanitizers/sanitizers.gni") | |
12 import("//build/toolchain/toolchain.gni") | |
13 | |
14 declare_args() { | |
15 # Limit the number of concurrent links; we often want to run fewer | |
16 # links at once than we do compiles, because linking is memory-intensive. | |
17 # The default to use varies by platform and by the amount of memory | |
18 # available, so we call out to a script to get the right value. | |
19 concurrent_links = -1 | |
20 } | |
21 | |
22 if (concurrent_links == -1) { | |
23 if (allow_posix_link_time_opt || is_cfi) { | |
24 args = [ "--lto" ] | |
brettw
2016/06/06 17:33:38
This should be preceeded by an underscore to avoid
Dirk Pranke
2016/06/06 22:16:12
Acknowledged.
| |
25 } else { | |
26 args = [] | |
27 } | |
28 | |
29 # TODO(crbug.com/617429) Pass more build configuration info to the script | |
30 # so that we can compute better values. | |
31 concurrent_links = exec_script("get_concurrent_links.py", args, "value") | |
32 } | |
OLD | NEW |