| 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/chromecast_build.gni") |  | 
| 8 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") | 
| 9 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") | 
| 10 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") | 
| 11 import("//build/toolchain/cc_wrapper.gni") | 10 import("//build/toolchain/cc_wrapper.gni") | 
| 12 import("//build/toolchain/toolchain.gni") | 11 import("//build/toolchain/toolchain.gni") | 
| 13 import("//build_overrides/build.gni") | 12 import("//build_overrides/build.gni") | 
| 14 | 13 | 
| 15 if (current_cpu == "arm" || current_cpu == "arm64") { | 14 if (current_cpu == "arm" || current_cpu == "arm64") { | 
| 16   import("//build/config/arm.gni") | 15   import("//build/config/arm.gni") | 
| 17 } | 16 } | 
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1062     cflags += [ "/utf-8" ] | 1061     cflags += [ "/utf-8" ] | 
| 1063   } else { | 1062   } else { | 
| 1064     cflags = [ "-Wall" ] | 1063     cflags = [ "-Wall" ] | 
| 1065     if (treat_warnings_as_errors) { | 1064     if (treat_warnings_as_errors) { | 
| 1066       cflags += [ "-Werror" ] | 1065       cflags += [ "-Werror" ] | 
| 1067 | 1066 | 
| 1068       # The compiler driver can sometimes (rarely) emit warnings before calling | 1067       # The compiler driver can sometimes (rarely) emit warnings before calling | 
| 1069       # the actual linker.  Make sure these warnings are treated as errors as | 1068       # the actual linker.  Make sure these warnings are treated as errors as | 
| 1070       # well. | 1069       # well. | 
| 1071       # TODO(thakis): Enable in use_custom_libcxx builds, crbug.com/669072 | 1070       # TODO(thakis): Enable in use_custom_libcxx builds, crbug.com/669072 | 
| 1072       # TODO(thakis): Enable in chromecast builds, crbug.com/669076 | 1071       if (!use_custom_libcxx) { | 
| 1073       if (!use_custom_libcxx && !is_chromecast) { |  | 
| 1074         ldflags = [ "-Werror" ] | 1072         ldflags = [ "-Werror" ] | 
| 1075       } | 1073       } | 
| 1076     } | 1074     } | 
| 1077     if (is_clang) { | 1075     if (is_clang) { | 
| 1078       # Enable -Wextra for chromium_code when we control the compiler. | 1076       # Enable -Wextra for chromium_code when we control the compiler. | 
| 1079       cflags += [ "-Wextra" ] | 1077       cflags += [ "-Wextra" ] | 
| 1080     } | 1078     } | 
| 1081 | 1079 | 
| 1082     # In Chromium code, we define __STDC_foo_MACROS in order to get the | 1080     # In Chromium code, we define __STDC_foo_MACROS in order to get the | 
| 1083     # C99 macros on Mac and Linux. | 1081     # C99 macros on Mac and Linux. | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1124       "_CRT_NONSTDC_NO_WARNINGS", | 1122       "_CRT_NONSTDC_NO_WARNINGS", | 
| 1125       "_CRT_NONSTDC_NO_DEPRECATE", | 1123       "_CRT_NONSTDC_NO_DEPRECATE", | 
| 1126     ] | 1124     ] | 
| 1127   } else { | 1125   } else { | 
| 1128     # GCC may emit unsuppressible warnings so don't add -Werror for no chromium | 1126     # GCC may emit unsuppressible warnings so don't add -Werror for no chromium | 
| 1129     # code. crbug.com/589724 | 1127     # code. crbug.com/589724 | 
| 1130     if (treat_warnings_as_errors && is_clang) { | 1128     if (treat_warnings_as_errors && is_clang) { | 
| 1131       cflags += [ "-Werror" ] | 1129       cflags += [ "-Werror" ] | 
| 1132 | 1130 | 
| 1133       # TODO(thakis): Enable in use_custom_libcxx builds, crbug.com/669072 | 1131       # TODO(thakis): Enable in use_custom_libcxx builds, crbug.com/669072 | 
| 1134       # TODO(thakis): Enable in chromecast builds, crbug.com/669076 | 1132       if (!use_custom_libcxx) { | 
| 1135       if (!use_custom_libcxx && !is_chromecast) { |  | 
| 1136         ldflags = [ "-Werror" ] | 1133         ldflags = [ "-Werror" ] | 
| 1137       } | 1134       } | 
| 1138     } | 1135     } | 
| 1139     if (is_clang && !is_nacl) { | 1136     if (is_clang && !is_nacl) { | 
| 1140       # TODO(thakis): Remove !is_nacl once | 1137       # TODO(thakis): Remove !is_nacl once | 
| 1141       # https://codereview.webrtc.org/1552863002/ made its way into chromium. | 1138       # https://codereview.webrtc.org/1552863002/ made its way into chromium. | 
| 1142       cflags += [ "-Wall" ] | 1139       cflags += [ "-Wall" ] | 
| 1143     } | 1140     } | 
| 1144   } | 1141   } | 
| 1145 | 1142 | 
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1634 | 1631 | 
| 1635 if (is_ios || is_mac) { | 1632 if (is_ios || is_mac) { | 
| 1636   # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1633   # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 
| 1637   # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1634   # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 
| 1638   config("enable_arc") { | 1635   config("enable_arc") { | 
| 1639     common_flags = [ "-fobjc-arc" ] | 1636     common_flags = [ "-fobjc-arc" ] | 
| 1640     cflags_objc = common_flags | 1637     cflags_objc = common_flags | 
| 1641     cflags_objcc = common_flags | 1638     cflags_objcc = common_flags | 
| 1642   } | 1639   } | 
| 1643 } | 1640 } | 
| OLD | NEW | 
|---|