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/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 Loading... |
1239 # http://crbug.com/234010. As workaround, disable --as-needed. | 1239 # http://crbug.com/234010. As workaround, disable --as-needed. |
1240 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] | 1240 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] |
1241 } | 1241 } |
1242 } | 1242 } |
1243 } | 1243 } |
1244 | 1244 |
1245 # Default "optimization on" config. | 1245 # Default "optimization on" config. |
1246 config("optimize") { | 1246 config("optimize") { |
1247 if (is_win) { | 1247 if (is_win) { |
1248 if (is_official_build && full_wpo_on_official) { | 1248 if (is_official_build && full_wpo_on_official) { |
1249 common_optimize_on_cflags += [ "/GL" ] | 1249 common_optimize_on_cflags += [ |
| 1250 "/GL", # Whole program optimization. |
| 1251 |
| 1252 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
| 1253 # Probably anything that this would catch that wouldn't be caught in a |
| 1254 # normal build isn't going to actually be a bug, so the incremental |
| 1255 # value of C4702 for PGO builds is likely very small. |
| 1256 "/wd4702", |
| 1257 ] |
1250 } | 1258 } |
1251 | 1259 |
1252 # Favor size over speed, /O1 must be before the common flags. The GYP | 1260 # Favor size over speed, /O1 must be before the common flags. The GYP |
1253 # build also specifies /Os and /GF but these are implied by /O1. | 1261 # build also specifies /Os and /GF but these are implied by /O1. |
1254 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] | 1262 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] |
1255 } else if (optimize_for_size) { | 1263 } else if (optimize_for_size) { |
1256 # Favor size over speed. | 1264 # Favor size over speed. |
1257 cflags = [ "-Os" ] + common_optimize_on_cflags | 1265 cflags = [ "-Os" ] + common_optimize_on_cflags |
1258 } else { | 1266 } else { |
1259 cflags = [ "-O2" ] + common_optimize_on_cflags | 1267 cflags = [ "-O2" ] + common_optimize_on_cflags |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 | 1457 |
1450 if (is_ios || is_mac) { | 1458 if (is_ios || is_mac) { |
1451 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1459 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1452 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1460 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1453 config("enable_arc") { | 1461 config("enable_arc") { |
1454 common_flags = [ "-fobjc-arc" ] | 1462 common_flags = [ "-fobjc-arc" ] |
1455 cflags_objc = common_flags | 1463 cflags_objc = common_flags |
1456 cflags_objcc = common_flags | 1464 cflags_objcc = common_flags |
1457 } | 1465 } |
1458 } | 1466 } |
OLD | NEW |