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 | 10 |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { | 807 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { |
808 cflags += [ "/wd4702" ] # Unreachable code. | 808 cflags += [ "/wd4702" ] # Unreachable code. |
809 } | 809 } |
810 | 810 |
811 # Building with Clang on Windows is a work in progress and very | 811 # Building with Clang on Windows is a work in progress and very |
812 # experimental. See crbug.com/82385. | 812 # experimental. See crbug.com/82385. |
813 # Keep this in sync with the similar block in build/common.gypi | 813 # Keep this in sync with the similar block in build/common.gypi |
814 if (is_clang) { | 814 if (is_clang) { |
815 cflags += [ | 815 cflags += [ |
816 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 | 816 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 |
| 817 "-Qunused-arguments", # http://crbug.com/504658 |
817 "-Wno-microsoft-enum-value", # http://crbug.com/505296 | 818 "-Wno-microsoft-enum-value", # http://crbug.com/505296 |
818 "-Wno-unknown-pragmas", # http://crbug.com/505314 | 819 "-Wno-unknown-pragmas", # http://crbug.com/505314 |
819 "-Wno-microsoft-cast", # http://crbug.com/550065 | 820 "-Wno-microsoft-cast", # http://crbug.com/550065 |
820 ] | 821 ] |
821 } | 822 } |
822 } else { | 823 } else { |
823 if (is_mac && !is_nacl) { | 824 if (is_mac && !is_nacl) { |
824 # When compiling Objective-C, warns if a method is used whose | 825 # When compiling Objective-C, warns if a method is used whose |
825 # availability is newer than the deployment target. This is not | 826 # availability is newer than the deployment target. This is not |
826 # required when compiling Chrome for iOS. | 827 # required when compiling Chrome for iOS. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 # } | 1220 # } |
1220 # So this config has to have the selection logic just like | 1221 # So this config has to have the selection logic just like |
1221 # "default_optimization", below. | 1222 # "default_optimization", below. |
1222 configs = [ "//build/config/nacl:irt_optimize" ] | 1223 configs = [ "//build/config/nacl:irt_optimize" ] |
1223 } else { | 1224 } else { |
1224 ldflags = common_optimize_on_ldflags | 1225 ldflags = common_optimize_on_ldflags |
1225 if (is_win) { | 1226 if (is_win) { |
1226 # Favor speed over size, /O2 must be before the common flags. The GYP | 1227 # Favor speed over size, /O2 must be before the common flags. The GYP |
1227 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. | 1228 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. |
1228 cflags = [ "/O2" ] + common_optimize_on_cflags | 1229 cflags = [ "/O2" ] + common_optimize_on_cflags |
1229 | 1230 if (is_official_build) { |
1230 # TODO(thakis): Remove is_clang here, https://crbug.com/598772 | |
1231 if (is_official_build && !is_clang) { | |
1232 # TODO(GYP): TODO(dpranke): Should these only be on in an official | 1231 # TODO(GYP): TODO(dpranke): Should these only be on in an official |
1233 # build, or on all the time? For now we'll require official build so | 1232 # build, or on all the time? For now we'll require official build so |
1234 # that the compile is clean. | 1233 # that the compile is clean. |
1235 cflags += [ | 1234 cflags += [ |
1236 "/GL", # Whole program optimization. | 1235 "/GL", # Whole program optimization. |
1237 | 1236 |
1238 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. | 1237 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
1239 # Probably anything that this would catch that wouldn't be caught in a | 1238 # Probably anything that this would catch that wouldn't be caught in a |
1240 # normal build isn't going to actually be a bug, so the incremental | 1239 # normal build isn't going to actually be a bug, so the incremental |
1241 # value of C4702 for PGO builds is likely very small. | 1240 # value of C4702 for PGO builds is likely very small. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 | 1345 |
1347 if (is_ios || is_mac) { | 1346 if (is_ios || is_mac) { |
1348 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1347 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1349 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1348 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1350 config("enable_arc") { | 1349 config("enable_arc") { |
1351 common_flags = [ "-fobjc-arc" ] | 1350 common_flags = [ "-fobjc-arc" ] |
1352 cflags_objc = common_flags | 1351 cflags_objc = common_flags |
1353 cflags_objcc = common_flags | 1352 cflags_objcc = common_flags |
1354 } | 1353 } |
1355 } | 1354 } |
OLD | NEW |