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

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

Issue 2761893002: Enable ThinLTO cache. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/nacl/config.gni") 8 import("//build/config/nacl/config.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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 # flags for specific features. 464 # flags for specific features.
465 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { 465 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
466 if (use_thin_lto) { 466 if (use_thin_lto) {
467 cflags += [ "-flto=thin" ] 467 cflags += [ "-flto=thin" ]
468 ldflags += [ "-flto=thin" ] 468 ldflags += [ "-flto=thin" ]
469 469
470 # Limit the parallelism to avoid too agressive competition between 470 # Limit the parallelism to avoid too agressive competition between
471 # linker jobs. This is still suboptimal to a potential dynamic 471 # linker jobs. This is still suboptimal to a potential dynamic
472 # resource allocation scheme, but should be good enough. 472 # resource allocation scheme, but should be good enough.
473 if (use_lld) { 473 if (use_lld) {
474 ldflags += [ "-Wl,--thinlto-jobs=8" ] 474 ldflags += [
475 "-Wl,--thinlto-jobs=8",
476 "-Wl,--thinlto-cache-dir=" +
477 rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
478 ]
475 } else { 479 } else {
476 ldflags += [ "-Wl,-plugin-opt,jobs=8" ] 480 ldflags += [ "-Wl,-plugin-opt,jobs=8" ]
477 } 481 }
478 } else { 482 } else {
479 # Note: ThinLTO does not currently have this feature implemented 483 # Note: ThinLTO does not currently have this feature implemented
480 # For Full LTO, it provides a measurable runtime speedup of Chrome. 484 # For Full LTO, it provides a measurable runtime speedup of Chrome.
481 cflags += [ 485 cflags += [
482 "-flto", 486 "-flto",
483 "-fwhole-program-vtables", 487 "-fwhole-program-vtables",
484 ] 488 ]
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 1707
1704 if (is_ios || is_mac) { 1708 if (is_ios || is_mac) {
1705 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1709 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1706 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1710 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1707 config("enable_arc") { 1711 config("enable_arc") {
1708 common_flags = [ "-fobjc-arc" ] 1712 common_flags = [ "-fobjc-arc" ]
1709 cflags_objc = common_flags 1713 cflags_objc = common_flags
1710 cflags_objcc = common_flags 1714 cflags_objcc = common_flags
1711 } 1715 }
1712 } 1716 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698