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

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

Issue 2540013006: Reland of win: Remove unneeded references to visual_studio_version now that it's always 2015. (Closed)
Patch Set: 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 | « base/BUILD.gn ('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/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 import("//build/toolchain/cc_wrapper.gni") 10 import("//build/toolchain/cc_wrapper.gni")
11 import("//build/toolchain/toolchain.gni") 11 import("//build/toolchain/toolchain.gni")
12 import("//build_overrides/build.gni") 12 import("//build_overrides/build.gni")
13 13
14 if (current_cpu == "arm" || current_cpu == "arm64") { 14 if (current_cpu == "arm" || current_cpu == "arm64") {
15 import("//build/config/arm.gni") 15 import("//build/config/arm.gni")
16 } 16 }
17 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 17 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
18 import("//build/config/mips.gni") 18 import("//build/config/mips.gni")
19 } 19 }
20 if (is_win) {
21 import("//build/config/win/visual_studio_version.gni")
22 }
23 if (is_mac) { 20 if (is_mac) {
24 import("//build/config/mac/symbols.gni") 21 import("//build/config/mac/symbols.gni")
25 } 22 }
26 23
27 declare_args() { 24 declare_args() {
28 # Default to warnings as errors for default workflow, where we catch 25 # Default to warnings as errors for default workflow, where we catch
29 # warnings with known toolchains. Allow overriding this e.g. for Chromium 26 # warnings with known toolchains. Allow overriding this e.g. for Chromium
30 # builds on Linux that could use a different version of the compiler. 27 # builds on Linux that could use a different version of the compiler.
31 # With GCC, warnings in no-Chromium code are always not treated as errors. 28 # With GCC, warnings in no-Chromium code are always not treated as errors.
32 treat_warnings_as_errors = true 29 treat_warnings_as_errors = true
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 902
906 # These are variable shadowing warnings that are new in VS2015. We 903 # These are variable shadowing warnings that are new in VS2015. We
907 # should work through these at some point -- they may be removed from 904 # should work through these at some point -- they may be removed from
908 # the RTM release in the /W4 set. 905 # the RTM release in the /W4 set.
909 "/wd4456", 906 "/wd4456",
910 "/wd4457", 907 "/wd4457",
911 "/wd4458", 908 "/wd4458",
912 "/wd4459", 909 "/wd4459",
913 ] 910 ]
914 911
915 if (visual_studio_version == "2015") { 912 cflags += [
913 # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
914 # TODO(brucedawson): fix warnings, crbug.com/554200
915 "/wd4312",
916 ]
917
918 if (current_cpu == "x86") {
916 cflags += [ 919 cflags += [
917 # C4312 is a VS 2015 64-bit warning for integer to larger pointer. 920 # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
918 # TODO(brucedawson): fix warnings, crbug.com/554200 921 # 4267. Example: short TruncTest(size_t x) { return x; }
919 "/wd4312", 922 # Since we disable 4244 we need to disable 4267 during migration.
923 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
924 "/wd4267",
920 ] 925 ]
921
922 if (current_cpu == "x86") {
923 cflags += [
924 # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
925 # 4267. Example: short TruncTest(size_t x) { return x; }
926 # Since we disable 4244 we need to disable 4267 during migration.
927 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
928 "/wd4267",
929 ]
930 }
931 } 926 }
932 927
933 # VS xtree header file needs to be patched or 4702 (unreachable code 928 # VS xtree header file needs to be patched or 4702 (unreachable code
934 # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is 929 # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is
935 # not patched. 930 # not patched.
936 if (!msvs_xtree_patched && 931 if (!msvs_xtree_patched &&
937 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { 932 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) {
938 cflags += [ "/wd4702" ] # Unreachable code. 933 cflags += [ "/wd4702" ] # Unreachable code.
939 } 934 }
940 935
941 # Building with Clang on Windows is a work in progress and very 936 # Building with Clang on Windows is a work in progress and very
942 # experimental. See crbug.com/82385. 937 # experimental. See crbug.com/82385.
943 # Keep this in sync with the similar block in build/common.gypi
944 if (is_clang) { 938 if (is_clang) {
945 cflags += [ 939 cflags += [
946 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 940 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657
947 "-Wno-microsoft-enum-value", # http://crbug.com/505296 941 "-Wno-microsoft-enum-value", # http://crbug.com/505296
948 "-Wno-unknown-pragmas", # http://crbug.com/505314 942 "-Wno-unknown-pragmas", # http://crbug.com/505314
949 "-Wno-microsoft-cast", # http://crbug.com/550065 943 "-Wno-microsoft-cast", # http://crbug.com/550065
950 ] 944 ]
951 } 945 }
952 } else { 946 } else {
953 if (is_mac && !is_nacl) { 947 if (is_mac && !is_nacl) {
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 # 1537 #
1544 # configs -= [ "//build/config/compiler:default_symbols" ] 1538 # configs -= [ "//build/config/compiler:default_symbols" ]
1545 # configs += [ "//build/config/compiler:symbols" ] 1539 # configs += [ "//build/config/compiler:symbols" ]
1546 1540
1547 # Full symbols. 1541 # Full symbols.
1548 config("symbols") { 1542 config("symbols") {
1549 if (is_win) { 1543 if (is_win) {
1550 import("//build/toolchain/goma.gni") 1544 import("//build/toolchain/goma.gni")
1551 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. 1545 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
1552 1546
1553 if (is_win_fastlink && visual_studio_version != "2013") { 1547 if (is_win_fastlink) {
1554 # Tell VS 2015+ to create a PDB that references debug 1548 # Tell VS 2015+ to create a PDB that references debug
1555 # information in .obj and .lib files instead of copying 1549 # information in .obj and .lib files instead of copying
1556 # it all. This flag is incompatible with /PROFILE 1550 # it all. This flag is incompatible with /PROFILE
1557 ldflags = [ "/DEBUG:FASTLINK" ] 1551 ldflags = [ "/DEBUG:FASTLINK" ]
1558 } else { 1552 } else {
1559 ldflags = [ "/DEBUG" ] 1553 ldflags = [ "/DEBUG" ]
1560 } 1554 }
1561 } else { 1555 } else {
1562 if (is_mac || is_ios) { 1556 if (is_mac || is_ios) {
1563 cflags = [ "-gdwarf-2" ] 1557 cflags = [ "-gdwarf-2" ]
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 1631
1638 if (is_ios || is_mac) { 1632 if (is_ios || is_mac) {
1639 # 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).
1640 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1634 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1641 config("enable_arc") { 1635 config("enable_arc") {
1642 common_flags = [ "-fobjc-arc" ] 1636 common_flags = [ "-fobjc-arc" ]
1643 cflags_objc = common_flags 1637 cflags_objc = common_flags
1644 cflags_objcc = common_flags 1638 cflags_objcc = common_flags
1645 } 1639 }
1646 } 1640 }
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | build/config/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698