| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 root_build_dir) | 409 root_build_dir) |
| 410 ldflags += [ | 410 ldflags += [ |
| 411 "-B$gold_path", | 411 "-B$gold_path", |
| 412 | 412 |
| 413 # Newer gccs and clangs support -fuse-ld, use the flag to force gold | 413 # Newer gccs and clangs support -fuse-ld, use the flag to force gold |
| 414 # selection. | 414 # selection. |
| 415 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html | 415 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html |
| 416 "-fuse-ld=gold", | 416 "-fuse-ld=gold", |
| 417 | 417 |
| 418 # TODO(brettw) common.gypi has this only for target toolset. | 418 # TODO(brettw) common.gypi has this only for target toolset. |
| 419 "-Wl,--icf=all", | 419 "-Wl,--icf=safe", |
| 420 | 420 |
| 421 # Experimentation found that using four linking threads | 421 # Experimentation found that using four linking threads |
| 422 # saved ~20% of link time. | 422 # saved ~20% of link time. |
| 423 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 | 423 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 |
| 424 # Only apply this to the target linker, since the host | 424 # Only apply this to the target linker, since the host |
| 425 # linker might not be gold, but isn't used much anyway. | 425 # linker might not be gold, but isn't used much anyway. |
| 426 # TODO(raymes): Disable threading because gold is frequently | 426 # TODO(raymes): Disable threading because gold is frequently |
| 427 # crashing on the bots: crbug.com/161942. | 427 # crashing on the bots: crbug.com/161942. |
| 428 #"-Wl,--threads", | 428 #"-Wl,--threads", |
| 429 #"-Wl,--thread-count=4", | 429 #"-Wl,--thread-count=4", |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 "-Wl,--exclude-libs=libc++_static.a", | 506 "-Wl,--exclude-libs=libc++_static.a", |
| 507 | 507 |
| 508 # Don't allow visible symbols from libraries that contain | 508 # Don't allow visible symbols from libraries that contain |
| 509 # assembly code with symbols that aren't hidden properly. | 509 # assembly code with symbols that aren't hidden properly. |
| 510 # http://crbug.com/448386 | 510 # http://crbug.com/448386 |
| 511 "-Wl,--exclude-libs=libvpx_assembly_arm.a", | 511 "-Wl,--exclude-libs=libvpx_assembly_arm.a", |
| 512 ] | 512 ] |
| 513 if (current_cpu == "arm") { | 513 if (current_cpu == "arm") { |
| 514 ldflags += [ | 514 ldflags += [ |
| 515 # Enable identical code folding to reduce size. | 515 # Enable identical code folding to reduce size. |
| 516 "-Wl,--icf=all", | 516 "-Wl,--icf=safe", |
| 517 ] | 517 ] |
| 518 } | 518 } |
| 519 | 519 |
| 520 if (is_clang) { | 520 if (is_clang) { |
| 521 if (current_cpu == "arm") { | 521 if (current_cpu == "arm") { |
| 522 cflags += [ "-target arm-linux-androideabi" ] | 522 cflags += [ "-target arm-linux-androideabi" ] |
| 523 ldflags += [ "-target arm-linux-androideabi" ] | 523 ldflags += [ "-target arm-linux-androideabi" ] |
| 524 } else if (current_cpu == "x86") { | 524 } else if (current_cpu == "x86") { |
| 525 cflags += [ "-target x86-linux-androideabi" ] | 525 cflags += [ "-target x86-linux-androideabi" ] |
| 526 ldflags += [ "-target x86-linux-androideabi" ] | 526 ldflags += [ "-target x86-linux-androideabi" ] |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 cflags += [ "-gsplit-dwarf" ] | 1143 cflags += [ "-gsplit-dwarf" ] |
| 1144 } | 1144 } |
| 1145 } | 1145 } |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 config("no_symbols") { | 1148 config("no_symbols") { |
| 1149 if (!is_win) { | 1149 if (!is_win) { |
| 1150 cflags = [ "-g0" ] | 1150 cflags = [ "-g0" ] |
| 1151 } | 1151 } |
| 1152 } | 1152 } |
| OLD | NEW |