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

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

Issue 2581893002: Use the /WX flag to have link warnings treated as errors. (Closed)
Patch Set: Move /WX setter into :compiler and respect fatal_linker_warnings 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 | build/config/win/BUILD.gn » ('j') | 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 826 }
827 827
828 # default_warnings ------------------------------------------------------------ 828 # default_warnings ------------------------------------------------------------
829 # 829 #
830 # Collects all warning flags that are used by default. This is used as a 830 # Collects all warning flags that are used by default. This is used as a
831 # subconfig of both chromium_code and no_chromium_code. This way these 831 # subconfig of both chromium_code and no_chromium_code. This way these
832 # flags are guaranteed to appear on the compile command line after -Wall. 832 # flags are guaranteed to appear on the compile command line after -Wall.
833 config("default_warnings") { 833 config("default_warnings") {
834 cflags = [] 834 cflags = []
835 cflags_cc = [] 835 cflags_cc = []
836 ldflags = []
836 837
837 if (is_win) { 838 if (is_win) {
838 if (treat_warnings_as_errors) { 839 if (treat_warnings_as_errors) {
839 cflags += [ "/WX" ] 840 cflags += [ "/WX" ]
840 } 841 }
842 if (fatal_linker_warnings) {
843 ldflags += [ "/WX" ]
844 }
841 845
842 cflags += [ 846 cflags += [
843 # Assume UTF-8 by default to avoid code page dependencies. 847 # Assume UTF-8 by default to avoid code page dependencies.
844 "/utf-8", 848 "/utf-8",
845 ] 849 ]
846 850
847 cflags += [ 851 cflags += [
848 # Warnings permanently disabled: 852 # Warnings permanently disabled:
849 853
850 # C4091: 'typedef ': ignored on left of 'X' when no variable is 854 # C4091: 'typedef ': ignored on left of 'X' when no variable is
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 1653
1650 if (is_ios || is_mac) { 1654 if (is_ios || is_mac) {
1651 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1655 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1652 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1656 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1653 config("enable_arc") { 1657 config("enable_arc") {
1654 common_flags = [ "-fobjc-arc" ] 1658 common_flags = [ "-fobjc-arc" ]
1655 cflags_objc = common_flags 1659 cflags_objc = common_flags
1656 cflags_objcc = common_flags 1660 cflags_objcc = common_flags
1657 } 1661 }
1658 } 1662 }
OLDNEW
« no previous file with comments | « no previous file | build/config/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698