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 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/compiler/compiler.gni") | 8 import("//build/config/compiler/compiler.gni") |
9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 # resource allocation scheme, but should be good enough. | 489 # resource allocation scheme, but should be good enough. |
490 if (use_lld) { | 490 if (use_lld) { |
491 ldflags += [ | 491 ldflags += [ |
492 "-Wl,--thinlto-jobs=8", | 492 "-Wl,--thinlto-jobs=8", |
493 "-Wl,--thinlto-cache-dir=" + | 493 "-Wl,--thinlto-cache-dir=" + |
494 rebase_path("$root_out_dir/thinlto-cache", root_build_dir), | 494 rebase_path("$root_out_dir/thinlto-cache", root_build_dir), |
495 ] | 495 ] |
496 } else { | 496 } else { |
497 ldflags += [ "-Wl,-plugin-opt,jobs=8" ] | 497 ldflags += [ "-Wl,-plugin-opt,jobs=8" ] |
498 } | 498 } |
| 499 |
| 500 # Disable optimization for now because they increase binary size by too |
| 501 # much. |
| 502 if (is_linux && use_lld) { |
| 503 ldflags += [ "-Wl,--lto-O0" ] |
| 504 } |
499 } else { | 505 } else { |
500 cflags += [ "-flto" ] | 506 cflags += [ "-flto" ] |
501 ldflags += [ "-flto" ] | 507 ldflags += [ "-flto" ] |
502 | 508 |
503 # Apply a lower LTO optimization level as the default is too slow. | 509 # Apply a lower LTO optimization level as the default is too slow. |
504 if (is_linux) { | 510 if (is_linux) { |
505 if (use_lld) { | 511 if (use_lld) { |
506 ldflags += [ "-Wl,--lto-O1" ] | 512 ldflags += [ "-Wl,--lto-O1" ] |
507 } else { | 513 } else { |
508 ldflags += [ "-Wl,-plugin-opt,O1" ] | 514 ldflags += [ "-Wl,-plugin-opt,O1" ] |
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 | 1812 |
1807 if (is_ios || is_mac) { | 1813 if (is_ios || is_mac) { |
1808 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1814 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1809 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1815 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1810 config("enable_arc") { | 1816 config("enable_arc") { |
1811 common_flags = [ "-fobjc-arc" ] | 1817 common_flags = [ "-fobjc-arc" ] |
1812 cflags_objc = common_flags | 1818 cflags_objc = common_flags |
1813 cflags_objcc = common_flags | 1819 cflags_objcc = common_flags |
1814 } | 1820 } |
1815 } | 1821 } |
OLD | NEW |