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

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

Issue 2341983002: ThinLTO: limit link / codegen parallelism to 16. (Closed)
Patch Set: fmt Created 4 years, 3 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 # optimizations/transformations that require whole-program visibility at link 427 # optimizations/transformations that require whole-program visibility at link
428 # time, so they need to be applied to all translation units, and we may end up 428 # time, so they need to be applied to all translation units, and we may end up
429 # with miscompiles if only part of the program is compiled with LTO flags. For 429 # with miscompiles if only part of the program is compiled with LTO flags. For
430 # that reason, we cannot allow targets to enable or disable these flags, for 430 # that reason, we cannot allow targets to enable or disable these flags, for
431 # example by disabling the optimize configuration. 431 # example by disabling the optimize configuration.
432 # TODO(pcc): Make this conditional on is_official_build rather than on gn 432 # TODO(pcc): Make this conditional on is_official_build rather than on gn
433 # flags for specific features. 433 # flags for specific features.
434 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { 434 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
435 if (use_thin_lto) { 435 if (use_thin_lto) {
436 cflags += [ "-flto=thin" ] 436 cflags += [ "-flto=thin" ]
437 ldflags += [ "-flto=thin" ] 437 ldflags += [
438 "-flto=thin",
439
440 # Limit the parallelism to the sweet spot on most of the machines.
441 # As of now, ThinLTO does not scale beyond 16 cores anyway.
442 "-Wl,-plugin-opt,jobs=16",
443 ]
438 } else { 444 } else {
439 # Note: ThinLTO does not currently have this feature implemented 445 # Note: ThinLTO does not currently have this feature implemented
440 # For Full LTO, it provides a measurable runtime speedup of Chrome. 446 # For Full LTO, it provides a measurable runtime speedup of Chrome.
441 cflags += [ 447 cflags += [
442 "-flto", 448 "-flto",
443 "-fwhole-program-vtables", 449 "-fwhole-program-vtables",
444 ] 450 ]
445 ldflags += [ 451 ldflags += [
446 "-flto", 452 "-flto",
447 "-fwhole-program-vtables", 453 "-fwhole-program-vtables",
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 1594
1589 if (is_ios || is_mac) { 1595 if (is_ios || is_mac) {
1590 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1596 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1591 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1597 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1592 config("enable_arc") { 1598 config("enable_arc") {
1593 common_flags = [ "-fobjc-arc" ] 1599 common_flags = [ "-fobjc-arc" ]
1594 cflags_objc = common_flags 1600 cflags_objc = common_flags
1595 cflags_objcc = common_flags 1601 cflags_objcc = common_flags
1596 } 1602 }
1597 } 1603 }
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