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 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 # that some libraries aren't needed when they actually are, | 1226 # that some libraries aren't needed when they actually are, |
1227 # http://crbug.com/234010. As workaround, disable --as-needed. | 1227 # http://crbug.com/234010. As workaround, disable --as-needed. |
1228 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] | 1228 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] |
1229 } | 1229 } |
1230 } | 1230 } |
1231 } | 1231 } |
1232 | 1232 |
1233 # Default "optimization on" config. | 1233 # Default "optimization on" config. |
1234 config("optimize") { | 1234 config("optimize") { |
1235 if (is_win) { | 1235 if (is_win) { |
1236 # TODO(sebmarchand): Enable this once we've decided to ship with full WPO | 1236 if (is_official_build && full_wpo_on_official) { |
1237 # and when the change to the incompatible projects (FFmpeg and Yasm) have | 1237 common_optimize_on_cflags += [ "/GL" ] |
1238 # have been committed. | 1238 } |
1239 #if (is_official_build) { | |
1240 # common_optimize_on_cflags += [ "/GL" ] | |
1241 #} | |
1242 | 1239 |
1243 # Favor size over speed, /O1 must be before the common flags. The GYP | 1240 # Favor size over speed, /O1 must be before the common flags. The GYP |
1244 # build also specifies /Os and /GF but these are implied by /O1. | 1241 # build also specifies /Os and /GF but these are implied by /O1. |
1245 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] | 1242 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] |
1246 } else if (optimize_for_size) { | 1243 } else if (optimize_for_size) { |
1247 # Favor size over speed. | 1244 # Favor size over speed. |
1248 cflags = [ "-Os" ] + common_optimize_on_cflags | 1245 cflags = [ "-Os" ] + common_optimize_on_cflags |
1249 } else { | 1246 } else { |
1250 cflags = [ "-O2" ] + common_optimize_on_cflags | 1247 cflags = [ "-O2" ] + common_optimize_on_cflags |
1251 } | 1248 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 | 1440 |
1444 if (is_ios || is_mac) { | 1441 if (is_ios || is_mac) { |
1445 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1442 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1446 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1443 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1447 config("enable_arc") { | 1444 config("enable_arc") { |
1448 common_flags = [ "-fobjc-arc" ] | 1445 common_flags = [ "-fobjc-arc" ] |
1449 cflags_objc = common_flags | 1446 cflags_objc = common_flags |
1450 cflags_objcc = common_flags | 1447 cflags_objcc = common_flags |
1451 } | 1448 } |
1452 } | 1449 } |
OLD | NEW |