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

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

Issue 2550973002: Revert "win: /utf-8 for all code" (Closed)
Patch Set: Revert "win: /utf-8 for all code" 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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 config("default_warnings") { 836 config("default_warnings") {
837 cflags = [] 837 cflags = []
838 cflags_cc = [] 838 cflags_cc = []
839 839
840 if (is_win) { 840 if (is_win) {
841 if (treat_warnings_as_errors) { 841 if (treat_warnings_as_errors) {
842 cflags += [ "/WX" ] 842 cflags += [ "/WX" ]
843 } 843 }
844 844
845 cflags += [ 845 cflags += [
846 # Assume UTF-8 by default to avoid code page dependencies.
847 "/utf-8",
848 ]
849
850 cflags += [
851 # Warnings permanently disabled: 846 # Warnings permanently disabled:
852 847
853 # C4091: 'typedef ': ignored on left of 'X' when no variable is 848 # C4091: 'typedef ': ignored on left of 'X' when no variable is
854 # declared. 849 # declared.
855 # This happens in a number of Windows headers. Dumb. 850 # This happens in a number of Windows headers. Dumb.
856 "/wd4091", 851 "/wd4091",
857 852
858 # C4127: conditional expression is constant 853 # C4127: conditional expression is constant
859 # This warning can in theory catch dead code and other problems, but 854 # This warning can in theory catch dead code and other problems, but
860 # triggers in far too many desirable cases where the conditional 855 # triggers in far too many desirable cases where the conditional
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 } 1066 }
1072 1067
1073 # chromium_code --------------------------------------------------------------- 1068 # chromium_code ---------------------------------------------------------------
1074 # 1069 #
1075 # Toggles between higher and lower warnings for code that is (or isn't) 1070 # Toggles between higher and lower warnings for code that is (or isn't)
1076 # part of Chromium. 1071 # part of Chromium.
1077 1072
1078 config("chromium_code") { 1073 config("chromium_code") {
1079 if (is_win) { 1074 if (is_win) {
1080 cflags = [ "/W4" ] # Warning level 4. 1075 cflags = [ "/W4" ] # Warning level 4.
1076
1077 # Assume UTF-8 by default to avoid code page dependencies.
1078 cflags += [ "/utf-8" ]
1081 } else { 1079 } else {
1082 cflags = [ "-Wall" ] 1080 cflags = [ "-Wall" ]
1083 if (treat_warnings_as_errors) { 1081 if (treat_warnings_as_errors) {
1084 cflags += [ "-Werror" ] 1082 cflags += [ "-Werror" ]
1085 1083
1086 # The compiler driver can sometimes (rarely) emit warnings before calling 1084 # The compiler driver can sometimes (rarely) emit warnings before calling
1087 # the actual linker. Make sure these warnings are treated as errors as 1085 # the actual linker. Make sure these warnings are treated as errors as
1088 # well. 1086 # well.
1089 ldflags = [ "-Werror" ] 1087 ldflags = [ "-Werror" ]
1090 } 1088 }
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 1641
1644 if (is_ios || is_mac) { 1642 if (is_ios || is_mac) {
1645 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1643 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1646 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1644 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1647 config("enable_arc") { 1645 config("enable_arc") {
1648 common_flags = [ "-fobjc-arc" ] 1646 common_flags = [ "-fobjc-arc" ]
1649 cflags_objc = common_flags 1647 cflags_objc = common_flags
1650 cflags_objcc = common_flags 1648 cflags_objcc = common_flags
1651 } 1649 }
1652 } 1650 }
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