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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 } | 1048 } |
1049 | 1049 |
1050 # chromium_code --------------------------------------------------------------- | 1050 # chromium_code --------------------------------------------------------------- |
1051 # | 1051 # |
1052 # Toggles between higher and lower warnings for code that is (or isn't) | 1052 # Toggles between higher and lower warnings for code that is (or isn't) |
1053 # part of Chromium. | 1053 # part of Chromium. |
1054 | 1054 |
1055 config("chromium_code") { | 1055 config("chromium_code") { |
1056 if (is_win) { | 1056 if (is_win) { |
1057 cflags = [ "/W4" ] # Warning level 4. | 1057 cflags = [ "/W4" ] # Warning level 4. |
| 1058 |
| 1059 # Assume UTF-8 by default to avoid code page dependencies. |
| 1060 cflags += [ "/utf-8" ] |
1058 } else { | 1061 } else { |
1059 cflags = [ "-Wall" ] | 1062 cflags = [ "-Wall" ] |
1060 if (treat_warnings_as_errors) { | 1063 if (treat_warnings_as_errors) { |
1061 cflags += [ "-Werror" ] | 1064 cflags += [ "-Werror" ] |
1062 } | 1065 } |
1063 if (is_clang) { | 1066 if (is_clang) { |
1064 # Enable -Wextra for chromium_code when we control the compiler. | 1067 # Enable -Wextra for chromium_code when we control the compiler. |
1065 cflags += [ "-Wextra" ] | 1068 cflags += [ "-Wextra" ] |
1066 } | 1069 } |
1067 | 1070 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 | 1617 |
1615 if (is_ios || is_mac) { | 1618 if (is_ios || is_mac) { |
1616 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1619 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1617 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1620 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1618 config("enable_arc") { | 1621 config("enable_arc") { |
1619 common_flags = [ "-fobjc-arc" ] | 1622 common_flags = [ "-fobjc-arc" ] |
1620 cflags_objc = common_flags | 1623 cflags_objc = common_flags |
1621 cflags_objcc = common_flags | 1624 cflags_objcc = common_flags |
1622 } | 1625 } |
1623 } | 1626 } |
OLD | NEW |