Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2543743002: win: /utf-8 for all code (Closed)
Patch Set: rebase for reland, no change, other deps rolled Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 config("default_warnings") { 833 config("default_warnings") {
834 cflags = [] 834 cflags = []
835 cflags_cc = [] 835 cflags_cc = []
836 836
837 if (is_win) { 837 if (is_win) {
838 if (treat_warnings_as_errors) { 838 if (treat_warnings_as_errors) {
839 cflags += [ "/WX" ] 839 cflags += [ "/WX" ]
840 } 840 }
841 841
842 cflags += [ 842 cflags += [
843 # Assume UTF-8 by default to avoid code page dependencies.
844 "/utf-8",
845 ]
846
847 cflags += [
843 # Warnings permanently disabled: 848 # Warnings permanently disabled:
844 849
845 # C4091: 'typedef ': ignored on left of 'X' when no variable is 850 # C4091: 'typedef ': ignored on left of 'X' when no variable is
846 # declared. 851 # declared.
847 # This happens in a number of Windows headers. Dumb. 852 # This happens in a number of Windows headers. Dumb.
848 "/wd4091", 853 "/wd4091",
849 854
850 # C4127: conditional expression is constant 855 # C4127: conditional expression is constant
851 # This warning can in theory catch dead code and other problems, but 856 # This warning can in theory catch dead code and other problems, but
852 # triggers in far too many desirable cases where the conditional 857 # triggers in far too many desirable cases where the conditional
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1068 }
1064 1069
1065 # chromium_code --------------------------------------------------------------- 1070 # chromium_code ---------------------------------------------------------------
1066 # 1071 #
1067 # Toggles between higher and lower warnings for code that is (or isn't) 1072 # Toggles between higher and lower warnings for code that is (or isn't)
1068 # part of Chromium. 1073 # part of Chromium.
1069 1074
1070 config("chromium_code") { 1075 config("chromium_code") {
1071 if (is_win) { 1076 if (is_win) {
1072 cflags = [ "/W4" ] # Warning level 4. 1077 cflags = [ "/W4" ] # Warning level 4.
1073
1074 # Assume UTF-8 by default to avoid code page dependencies.
1075 cflags += [ "/utf-8" ]
1076 } else { 1078 } else {
1077 cflags = [ "-Wall" ] 1079 cflags = [ "-Wall" ]
1078 if (treat_warnings_as_errors) { 1080 if (treat_warnings_as_errors) {
1079 cflags += [ "-Werror" ] 1081 cflags += [ "-Werror" ]
1080 1082
1081 # The compiler driver can sometimes (rarely) emit warnings before calling 1083 # The compiler driver can sometimes (rarely) emit warnings before calling
1082 # the actual linker. Make sure these warnings are treated as errors as 1084 # the actual linker. Make sure these warnings are treated as errors as
1083 # well. 1085 # well.
1084 ldflags = [ "-Werror" ] 1086 ldflags = [ "-Werror" ]
1085 } 1087 }
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 1639
1638 if (is_ios || is_mac) { 1640 if (is_ios || is_mac) {
1639 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1641 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1640 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1642 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1641 config("enable_arc") { 1643 config("enable_arc") {
1642 common_flags = [ "-fobjc-arc" ] 1644 common_flags = [ "-fobjc-arc" ]
1643 cflags_objc = common_flags 1645 cflags_objc = common_flags
1644 cflags_objcc = common_flags 1646 cflags_objcc = common_flags
1645 } 1647 }
1646 } 1648 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698