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

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

Issue 1828543003: clang/win: Stop passing -Qunused-arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try to fix official Created 4 years, 8 months 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 | « build/common.gypi ('k') | 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 10
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { 807 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) {
808 cflags += [ "/wd4702" ] # Unreachable code. 808 cflags += [ "/wd4702" ] # Unreachable code.
809 } 809 }
810 810
811 # Building with Clang on Windows is a work in progress and very 811 # Building with Clang on Windows is a work in progress and very
812 # experimental. See crbug.com/82385. 812 # experimental. See crbug.com/82385.
813 # Keep this in sync with the similar block in build/common.gypi 813 # Keep this in sync with the similar block in build/common.gypi
814 if (is_clang) { 814 if (is_clang) {
815 cflags += [ 815 cflags += [
816 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 816 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657
817 "-Qunused-arguments", # http://crbug.com/504658
818 "-Wno-microsoft-enum-value", # http://crbug.com/505296 817 "-Wno-microsoft-enum-value", # http://crbug.com/505296
819 "-Wno-unknown-pragmas", # http://crbug.com/505314 818 "-Wno-unknown-pragmas", # http://crbug.com/505314
820 "-Wno-microsoft-cast", # http://crbug.com/550065 819 "-Wno-microsoft-cast", # http://crbug.com/550065
821 ] 820 ]
822 } 821 }
823 } else { 822 } else {
824 if (is_mac && !is_nacl) { 823 if (is_mac && !is_nacl) {
825 # When compiling Objective-C, warns if a method is used whose 824 # When compiling Objective-C, warns if a method is used whose
826 # availability is newer than the deployment target. This is not 825 # availability is newer than the deployment target. This is not
827 # required when compiling Chrome for iOS. 826 # required when compiling Chrome for iOS.
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 # } 1219 # }
1221 # So this config has to have the selection logic just like 1220 # So this config has to have the selection logic just like
1222 # "default_optimization", below. 1221 # "default_optimization", below.
1223 configs = [ "//build/config/nacl:irt_optimize" ] 1222 configs = [ "//build/config/nacl:irt_optimize" ]
1224 } else { 1223 } else {
1225 ldflags = common_optimize_on_ldflags 1224 ldflags = common_optimize_on_ldflags
1226 if (is_win) { 1225 if (is_win) {
1227 # Favor speed over size, /O2 must be before the common flags. The GYP 1226 # Favor speed over size, /O2 must be before the common flags. The GYP
1228 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. 1227 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
1229 cflags = [ "/O2" ] + common_optimize_on_cflags 1228 cflags = [ "/O2" ] + common_optimize_on_cflags
1230 if (is_official_build) { 1229
1230 # TODO(thakis): Remove is_clang here, https://crbug.com/598772
1231 if (is_official_build && !is_clang) {
1231 # TODO(GYP): TODO(dpranke): Should these only be on in an official 1232 # TODO(GYP): TODO(dpranke): Should these only be on in an official
1232 # build, or on all the time? For now we'll require official build so 1233 # build, or on all the time? For now we'll require official build so
1233 # that the compile is clean. 1234 # that the compile is clean.
1234 cflags += [ 1235 cflags += [
1235 "/GL", # Whole program optimization. 1236 "/GL", # Whole program optimization.
1236 1237
1237 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. 1238 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
1238 # Probably anything that this would catch that wouldn't be caught in a 1239 # Probably anything that this would catch that wouldn't be caught in a
1239 # normal build isn't going to actually be a bug, so the incremental 1240 # normal build isn't going to actually be a bug, so the incremental
1240 # value of C4702 for PGO builds is likely very small. 1241 # value of C4702 for PGO builds is likely very small.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 1346
1346 if (is_ios || is_mac) { 1347 if (is_ios || is_mac) {
1347 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1348 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1348 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1349 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1349 config("enable_arc") { 1350 config("enable_arc") {
1350 common_flags = [ "-fobjc-arc" ] 1351 common_flags = [ "-fobjc-arc" ]
1351 cflags_objc = common_flags 1352 cflags_objc = common_flags
1352 cflags_objcc = common_flags 1353 cflags_objcc = common_flags
1353 } 1354 }
1354 } 1355 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/config/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698