| 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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
| 8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
| 9 } | 9 } |
| 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 # Only apply this to the target linker, since the host | 460 # Only apply this to the target linker, since the host |
| 461 # linker might not be gold, but isn't used much anyway. | 461 # linker might not be gold, but isn't used much anyway. |
| 462 # TODO(raymes): Disable threading because gold is frequently | 462 # TODO(raymes): Disable threading because gold is frequently |
| 463 # crashing on the bots: crbug.com/161942. | 463 # crashing on the bots: crbug.com/161942. |
| 464 #"-Wl,--threads", | 464 #"-Wl,--threads", |
| 465 #"-Wl,--thread-count=4", | 465 #"-Wl,--thread-count=4", |
| 466 ] | 466 ] |
| 467 | 467 |
| 468 if (!is_asan && !is_msan && !is_lsan && !is_tsan) { | 468 if (!is_asan && !is_msan && !is_lsan && !is_tsan) { |
| 469 # TODO(brettw) common.gypi has this only for target toolset. | 469 # TODO(brettw) common.gypi has this only for target toolset. |
| 470 if (current_cpu == "x64") { | 470 ldflags += [ "-Wl,--icf=all" ] |
| 471 # --icf=safe disables much more folding on x86_64 than elsewhere, see | |
| 472 # http://crbug.com/492177. Turning it on saves over 12 MB of binary | |
| 473 # size, but it seems to regress cold startup time by over a second | |
| 474 # (see http://crbug.com/492809). | |
| 475 # TODO(thakis): Check if disabling ICF would inmprove android cold start | |
| 476 # times by several seconds too. | |
| 477 ldflags += [ "-Wl,--icf=safe" ] | |
| 478 } else { | |
| 479 ldflags += [ "-Wl,--icf=all" ] | |
| 480 } | |
| 481 } | 471 } |
| 482 | 472 |
| 483 # TODO(thestig): Make this flag work with GN. | 473 # TODO(thestig): Make this flag work with GN. |
| 484 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { | 474 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { |
| 485 # ldflags += [ | 475 # ldflags += [ |
| 486 # "-Wl,--detect-odr-violations", | 476 # "-Wl,--detect-odr-violations", |
| 487 # ] | 477 # ] |
| 488 #} | 478 #} |
| 489 } | 479 } |
| 490 | 480 |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 cflags += [ "-gsplit-dwarf" ] | 1247 cflags += [ "-gsplit-dwarf" ] |
| 1258 } | 1248 } |
| 1259 } | 1249 } |
| 1260 } | 1250 } |
| 1261 | 1251 |
| 1262 config("no_symbols") { | 1252 config("no_symbols") { |
| 1263 if (!is_win) { | 1253 if (!is_win) { |
| 1264 cflags = [ "-g0" ] | 1254 cflags = [ "-g0" ] |
| 1265 } | 1255 } |
| 1266 } | 1256 } |
| OLD | NEW |