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

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

Issue 2474963002: Add a flag to turn on incremental LTCG. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | build/config/compiler/compiler.gni » ('j') | build/config/compiler/compiler.gni » ('J')
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 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 ] 1239 ]
1240 } 1240 }
1241 common_optimize_on_ldflags = [] 1241 common_optimize_on_ldflags = []
1242 if (!is_component_build) { 1242 if (!is_component_build) {
1243 common_optimize_on_ldflags += [ "/OPT:ICF" ] # Redundant COMDAT folding. 1243 common_optimize_on_ldflags += [ "/OPT:ICF" ] # Redundant COMDAT folding.
1244 } 1244 }
1245 if (is_official_build) { 1245 if (is_official_build) {
1246 common_optimize_on_ldflags += [ "/OPT:REF" ] # Remove unreferenced data. 1246 common_optimize_on_ldflags += [ "/OPT:REF" ] # Remove unreferenced data.
1247 if (!use_lld) { 1247 if (!use_lld) {
1248 common_optimize_on_ldflags += [ 1248 common_optimize_on_ldflags += [
1249 "/LTCG", # Link-time code generation.
1250
1251 # Set the number of LTCG code-gen threads to eight. The default is four. 1249 # Set the number of LTCG code-gen threads to eight. The default is four.
1252 # This gives a 5-10% link speedup. 1250 # This gives a 5-10% link speedup.
1253 "/cgthreads:8", 1251 "/cgthreads:8",
1254 ] 1252 ]
1253 if (use_incremental_ltcg) {
1254 # Incremental Link-time code generation.
1255 common_optimize_on_ldflags += [ "/LTCG:INCREMENTAL" ]
1256 } else {
1257 common_optimize_on_ldflags += [ "/LTCG" ] # Link-time code generation.
1258 }
1255 } 1259 }
1256 if (full_wpo_on_official) { 1260 if (full_wpo_on_official) {
1257 arflags = [ "/LTCG" ] 1261 if (use_incremental_ltcg) {
1262 arflags = [ "/LTCG:INCREMENTAL" ]
1263 } else {
1264 arflags = [ "/LTCG" ]
1265 }
1258 } 1266 }
1259 } 1267 }
1260 } else { 1268 } else {
1261 common_optimize_on_cflags = [] 1269 common_optimize_on_cflags = []
1262 common_optimize_on_ldflags = [] 1270 common_optimize_on_ldflags = []
1263 1271
1264 if (is_android) { 1272 if (is_android) {
1265 # TODO(jdduke) Re-enable on mips after resolving linking 1273 # TODO(jdduke) Re-enable on mips after resolving linking
1266 # issues with libc++ (crbug.com/456380). 1274 # issues with libc++ (crbug.com/456380).
1267 if (current_cpu != "mipsel" && current_cpu != "mips64el") { 1275 if (current_cpu != "mipsel" && current_cpu != "mips64el") {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 1620
1613 if (is_ios || is_mac) { 1621 if (is_ios || is_mac) {
1614 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1622 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1615 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1623 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1616 config("enable_arc") { 1624 config("enable_arc") {
1617 common_flags = [ "-fobjc-arc" ] 1625 common_flags = [ "-fobjc-arc" ]
1618 cflags_objc = common_flags 1626 cflags_objc = common_flags
1619 cflags_objcc = common_flags 1627 cflags_objcc = common_flags
1620 } 1628 }
1621 } 1629 }
OLDNEW
« no previous file with comments | « no previous file | build/config/compiler/compiler.gni » ('j') | build/config/compiler/compiler.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698