Chromium Code Reviews| 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1137 if (!use_cfi_diag && !is_ubsan_vptr && !is_ubsan_security) { | 1137 if (!use_cfi_diag && !is_ubsan_vptr && !is_ubsan_security) { |
| 1138 if (is_win) { | 1138 if (is_win) { |
| 1139 cflags_cc = [ "/GR-" ] | 1139 cflags_cc = [ "/GR-" ] |
| 1140 } else { | 1140 } else { |
| 1141 cflags_cc = [ "-fno-rtti" ] | 1141 cflags_cc = [ "-fno-rtti" ] |
| 1142 cflags_objcc = cflags_cc | 1142 cflags_objcc = cflags_cc |
| 1143 } | 1143 } |
| 1144 } | 1144 } |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 # exceptions ------------------------------------------------------------------- | |
| 1148 # | |
| 1149 # Allows turning exceptions on or off. | |
|
brettw
2016/08/31 17:01:20
Can this comment be a little more precise? This wi
| |
| 1150 | |
| 1151 config("no_exceptions") { | |
| 1152 if (is_posix) { | |
| 1153 cflags_cc = [ "-fno-exceptions" ] | |
| 1154 cflags_objcc = cflags_cc | |
| 1155 } | |
| 1156 if (is_win) { | |
| 1157 defines = [ "_HAS_EXCEPTIONS=0" ] | |
| 1158 } | |
| 1159 } | |
| 1160 | |
| 1147 # Warnings --------------------------------------------------------------------- | 1161 # Warnings --------------------------------------------------------------------- |
| 1148 | 1162 |
| 1149 # This will generate warnings when using Clang if code generates exit-time | 1163 # This will generate warnings when using Clang if code generates exit-time |
| 1150 # destructors, which will slow down closing the program. | 1164 # destructors, which will slow down closing the program. |
| 1151 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 | 1165 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1152 config("wexit_time_destructors") { | 1166 config("wexit_time_destructors") { |
| 1153 # TODO: Enable on Windows too, http://crbug.com/404525 | 1167 # TODO: Enable on Windows too, http://crbug.com/404525 |
| 1154 if (is_clang && !is_win) { | 1168 if (is_clang && !is_win) { |
| 1155 cflags = [ "-Wexit-time-destructors" ] | 1169 cflags = [ "-Wexit-time-destructors" ] |
| 1156 } | 1170 } |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1568 | 1582 |
| 1569 if (is_ios || is_mac) { | 1583 if (is_ios || is_mac) { |
| 1570 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1584 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1571 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1585 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1572 config("enable_arc") { | 1586 config("enable_arc") { |
| 1573 common_flags = [ "-fobjc-arc" ] | 1587 common_flags = [ "-fobjc-arc" ] |
| 1574 cflags_objc = common_flags | 1588 cflags_objc = common_flags |
| 1575 cflags_objcc = common_flags | 1589 cflags_objcc = common_flags |
| 1576 } | 1590 } |
| 1577 } | 1591 } |
| OLD | NEW |