OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 | 9 |
10 declare_args() { | 10 declare_args() { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 if (cpu_arch == "x64") { | 167 if (cpu_arch == "x64") { |
168 # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of | 168 # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of |
169 # address space, and it doesn't support cross-compiling). | 169 # address space, and it doesn't support cross-compiling). |
170 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | 170 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
171 root_build_dir) | 171 root_build_dir) |
172 ldflags += [ | 172 ldflags += [ |
173 "-B$gold_path", | 173 "-B$gold_path", |
174 | 174 |
175 # There seems to be a conflict of --icf and -pie in gold which can | 175 # There seems to be a conflict of --icf and -pie in gold which can |
176 # generate crashy binaries. As a security measure, -pie takes | 176 # generate crashy binaries. As a security measure, -pie takes |
177 # precendence for now. | 177 # precedence for now. |
178 # TODO(brettw) common.gypi has this only for target toolset. | 178 # TODO(brettw) common.gypi has this only for target toolset. |
179 #"-Wl,--icf=safe", | 179 #"-Wl,--icf=safe", |
180 "-Wl,--icf=none", | 180 "-Wl,--icf=none", |
181 | 181 |
182 # Experimentation found that using four linking threads | 182 # Experimentation found that using four linking threads |
183 # saved ~20% of link time. | 183 # saved ~20% of link time. |
184 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thr
ead/thread/281527606915bb36 | 184 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thr
ead/thread/281527606915bb36 |
185 # Only apply this to the target linker, since the host | 185 # Only apply this to the target linker, since the host |
186 # linker might not be gold, but isn't used much anyway. | 186 # linker might not be gold, but isn't used much anyway. |
187 # TODO(raymes): Disable threading because gold is frequently | 187 # TODO(raymes): Disable threading because gold is frequently |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 cflags = [ "-g1" ] | 749 cflags = [ "-g1" ] |
750 } | 750 } |
751 } | 751 } |
752 | 752 |
753 config("no_symbols") { | 753 config("no_symbols") { |
754 if (!is_win) { | 754 if (!is_win) { |
755 cflags = [ "-g0" ] | 755 cflags = [ "-g0" ] |
756 } | 756 } |
757 } | 757 } |
758 | 758 |
OLD | NEW |