Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2957533002: Enable ThinLTO for POSIX LTO by default on Linux, take 2. (Closed)
Patch Set: New patch Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 ldflags += [ "-flto=thin" ] 486 ldflags += [ "-flto=thin" ]
487 487
488 # Limit the parallelism to avoid too agressive competition between 488 # Limit the parallelism to avoid too agressive competition between
489 # linker jobs. This is still suboptimal to a potential dynamic 489 # linker jobs. This is still suboptimal to a potential dynamic
490 # resource allocation scheme, but should be good enough. 490 # resource allocation scheme, but should be good enough.
491 if (use_lld) { 491 if (use_lld) {
492 ldflags += [ 492 ldflags += [
493 "-Wl,--thinlto-jobs=8", 493 "-Wl,--thinlto-jobs=8",
494 "-Wl,--thinlto-cache-dir=" + 494 "-Wl,--thinlto-cache-dir=" +
495 rebase_path("$root_out_dir/thinlto-cache", root_build_dir), 495 rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
496
497 # Limit the size of the ThinLTO cache to 10% of available disk space.
498 # TODO(pcc): Change the limit from a percentage to an absolute size
499 # (10-20GB) once that feature lands in LLVM.
500 "-Wl,--thinlto-cache-policy,cache_size=10%",
496 ] 501 ]
497 } else { 502 } else {
498 ldflags += [ "-Wl,-plugin-opt,jobs=8" ] 503 ldflags += [ "-Wl,-plugin-opt,jobs=8" ]
499 } 504 }
500 505
501 # Disable optimization for now because they increase binary size by too 506 # Disable optimization for now because they increase binary size by too
502 # much. 507 # much.
503 if (is_linux && use_lld) { 508 if (is_linux && use_lld) {
504 ldflags += [ "-Wl,--lto-O0" ] 509 ldflags += [ "-Wl,--lto-O0" ]
505 } 510 }
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 1811
1807 if (is_ios || is_mac) { 1812 if (is_ios || is_mac) {
1808 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1813 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1809 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1814 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1810 config("enable_arc") { 1815 config("enable_arc") {
1811 common_flags = [ "-fobjc-arc" ] 1816 common_flags = [ "-fobjc-arc" ]
1812 cflags_objc = common_flags 1817 cflags_objc = common_flags
1813 cflags_objcc = common_flags 1818 cflags_objcc = common_flags
1814 } 1819 }
1815 } 1820 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/toolchain.gni » ('j') | chrome/installer/linux/debian/expected_deps_x64_jessie » ('J')

Powered by Google App Engine
This is Rietveld 408576698