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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 # the default. This is necessary to delay the evaluation of the default | 64 # the default. This is necessary to delay the evaluation of the default |
65 # value expression until after its input values such as use_gold have | 65 # value expression until after its input values such as use_gold have |
66 # been set, e.g. by a toolchain_args() block. | 66 # been set, e.g. by a toolchain_args() block. |
67 use_debug_fission = "default" | 67 use_debug_fission = "default" |
68 | 68 |
69 if (is_win) { | 69 if (is_win) { |
70 # Whether the VS xtree header has been patched to disable warning 4702. If | 70 # Whether the VS xtree header has been patched to disable warning 4702. If |
71 # it has, then we don't need to disable 4702 (unreachable code warning). | 71 # it has, then we don't need to disable 4702 (unreachable code warning). |
72 # The patch is preapplied to the internal toolchain and hence all bots. | 72 # The patch is preapplied to the internal toolchain and hence all bots. |
73 msvs_xtree_patched = false | 73 msvs_xtree_patched = false |
| 74 |
| 75 # Whether or not the official builds should be build with full WPO. |
| 76 full_wpo_on_official = false |
74 } | 77 } |
75 | 78 |
76 # Omit unwind support in official builds to save space. | 79 # Omit unwind support in official builds to save space. |
77 # We can use breakpad for these builds. | 80 # We can use breakpad for these builds. |
78 exclude_unwind_tables = is_chrome_branded && is_official_build | 81 exclude_unwind_tables = is_chrome_branded && is_official_build |
79 | 82 |
80 # If true, gold linker will save symbol table inside object files. | 83 # If true, gold linker will save symbol table inside object files. |
81 # This speeds up gdb startup by 60% | 84 # This speeds up gdb startup by 60% |
82 gdb_index = false | 85 gdb_index = false |
83 | 86 |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 # that some libraries aren't needed when they actually are, | 1229 # that some libraries aren't needed when they actually are, |
1227 # http://crbug.com/234010. As workaround, disable --as-needed. | 1230 # http://crbug.com/234010. As workaround, disable --as-needed. |
1228 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] | 1231 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] |
1229 } | 1232 } |
1230 } | 1233 } |
1231 } | 1234 } |
1232 | 1235 |
1233 # Default "optimization on" config. | 1236 # Default "optimization on" config. |
1234 config("optimize") { | 1237 config("optimize") { |
1235 if (is_win) { | 1238 if (is_win) { |
1236 # TODO(sebmarchand): Enable this once we've decided to ship with full WPO | 1239 if (is_official_build && full_wpo_on_official) { |
1237 # and when the change to the incompatible projects (FFmpeg and Yasm) have | 1240 common_optimize_on_cflags += [ "/GL" ] |
1238 # have been committed. | 1241 } |
1239 #if (is_official_build) { | |
1240 # common_optimize_on_cflags += [ "/GL" ] | |
1241 #} | |
1242 | 1242 |
1243 # Favor size over speed, /O1 must be before the common flags. The GYP | 1243 # 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. | 1244 # build also specifies /Os and /GF but these are implied by /O1. |
1245 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] | 1245 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] |
1246 } else if (optimize_for_size) { | 1246 } else if (optimize_for_size) { |
1247 # Favor size over speed. | 1247 # Favor size over speed. |
1248 cflags = [ "-Os" ] + common_optimize_on_cflags | 1248 cflags = [ "-Os" ] + common_optimize_on_cflags |
1249 } else { | 1249 } else { |
1250 cflags = [ "-O2" ] + common_optimize_on_cflags | 1250 cflags = [ "-O2" ] + common_optimize_on_cflags |
1251 } | 1251 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 | 1443 |
1444 if (is_ios || is_mac) { | 1444 if (is_ios || is_mac) { |
1445 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1445 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1446 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1446 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1447 config("enable_arc") { | 1447 config("enable_arc") { |
1448 common_flags = [ "-fobjc-arc" ] | 1448 common_flags = [ "-fobjc-arc" ] |
1449 cflags_objc = common_flags | 1449 cflags_objc = common_flags |
1450 cflags_objcc = common_flags | 1450 cflags_objcc = common_flags |
1451 } | 1451 } |
1452 } | 1452 } |
OLD | NEW |