OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 # This file should only be imported from files that define toolchains. | 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 | 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. | 7 # in the context of the default_toolchain, so we can at least check for that. |
8 assert(current_toolchain == default_toolchain) | 8 assert(current_toolchain == default_toolchain) |
9 | 9 |
10 import("//build/config/compiler/compiler.gni") | 10 import("//build/config/compiler/compiler.gni") |
(...skipping 15 matching lines...) Expand all Loading... |
26 "--mem_per_link_gb=10", | 26 "--mem_per_link_gb=10", |
27 "--reserve_mem_gb=10", | 27 "--reserve_mem_gb=10", |
28 ] | 28 ] |
29 } else { | 29 } else { |
30 # Full LTO, needs lots of RAM | 30 # Full LTO, needs lots of RAM |
31 _args = [ | 31 _args = [ |
32 "--mem_per_link_gb=26", | 32 "--mem_per_link_gb=26", |
33 "--reserve_mem_gb=20", | 33 "--reserve_mem_gb=20", |
34 ] | 34 ] |
35 } | 35 } |
| 36 } else if (use_sanitizer_coverage) { |
| 37 # Sanitizer coverage instrumentation increases linker memory consumption |
| 38 # significantly. |
| 39 _args = [ "--mem_per_link_gb=12" ] |
36 } else if (is_win) { | 40 } else if (is_win) { |
37 _args = [ "--mem_per_link_gb=5" ] | 41 _args = [ "--mem_per_link_gb=5" ] |
38 } else if (is_mac) { | 42 } else if (is_mac) { |
39 _args = [ "--mem_per_link_gb=4" ] | 43 _args = [ "--mem_per_link_gb=4" ] |
40 } else if (is_android && !is_component_build && symbol_level == 2) { | 44 } else if (is_android && !is_component_build && symbol_level == 2) { |
41 _args = [ "--mem_per_link_gb=25" ] | 45 _args = [ "--mem_per_link_gb=25" ] |
42 } else { | 46 } else { |
43 _args = [] | 47 _args = [] |
44 } | 48 } |
45 | 49 |
46 # TODO(crbug.com/617429) Pass more build configuration info to the script | 50 # TODO(crbug.com/617429) Pass more build configuration info to the script |
47 # so that we can compute better values. | 51 # so that we can compute better values. |
48 concurrent_links = exec_script("get_concurrent_links.py", _args, "value") | 52 concurrent_links = exec_script("get_concurrent_links.py", _args, "value") |
49 } | 53 } |
OLD | NEW |