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

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

Issue 2450933002: win: Remove unneeded references to visual_studio_version now that it's always 2015. (Closed)
Patch Set: Created 4 years, 1 month 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
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")
11 import("//build_overrides/build.gni") 11 import("//build_overrides/build.gni")
12 12
13 if (current_cpu == "arm" || current_cpu == "arm64") { 13 if (current_cpu == "arm" || current_cpu == "arm64") {
14 import("//build/config/arm.gni") 14 import("//build/config/arm.gni")
15 } 15 }
16 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 16 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
17 import("//build/config/mips.gni") 17 import("//build/config/mips.gni")
18 } 18 }
19 if (is_win) {
20 import("//build/config/win/visual_studio_version.gni")
21 }
22 if (is_mac) { 19 if (is_mac) {
23 import("//build/config/mac/symbols.gni") 20 import("//build/config/mac/symbols.gni")
24 } 21 }
25 22
26 declare_args() { 23 declare_args() {
27 # Default to warnings as errors for default workflow, where we catch 24 # Default to warnings as errors for default workflow, where we catch
28 # warnings with known toolchains. Allow overriding this e.g. for Chromium 25 # warnings with known toolchains. Allow overriding this e.g. for Chromium
29 # builds on Linux that could use a different version of the compiler. 26 # builds on Linux that could use a different version of the compiler.
30 # With GCC, warnings in no-Chromium code are always not treated as errors. 27 # With GCC, warnings in no-Chromium code are always not treated as errors.
31 treat_warnings_as_errors = true 28 treat_warnings_as_errors = true
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 894
898 # These are variable shadowing warnings that are new in VS2015. We 895 # These are variable shadowing warnings that are new in VS2015. We
899 # should work through these at some point -- they may be removed from 896 # should work through these at some point -- they may be removed from
900 # the RTM release in the /W4 set. 897 # the RTM release in the /W4 set.
901 "/wd4456", 898 "/wd4456",
902 "/wd4457", 899 "/wd4457",
903 "/wd4458", 900 "/wd4458",
904 "/wd4459", 901 "/wd4459",
905 ] 902 ]
906 903
907 if (visual_studio_version == "2015") { 904 cflags += [
905 # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
906 # TODO(brucedawson): fix warnings, crbug.com/554200
907 "/wd4312",
908
909 # TODO(brucedawson): http://crbug.com/593448 - C4595 is an 'illegal
910 # inline operator new' warning that is new in VS 2015 Update 2.
911 # This is equivalent to clang's no-inline-new-delete warning.
912 # See http://bugs.icu-project.org/trac/ticket/11122
913 "/wd4595",
914 ]
915
916 if (current_cpu == "x86") {
908 cflags += [ 917 cflags += [
909 # C4312 is a VS 2015 64-bit warning for integer to larger pointer. 918 # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
910 # TODO(brucedawson): fix warnings, crbug.com/554200 919 # 4267. Example: short TruncTest(size_t x) { return x; }
911 "/wd4312", 920 # Since we disable 4244 we need to disable 4267 during migration.
912 921 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
913 # TODO(brucedawson): http://crbug.com/593448 - C4595 is an 'illegal 922 "/wd4267",
914 # inline operator new' warning that is new in VS 2015 Update 2.
915 # This is equivalent to clang's no-inline-new-delete warning.
916 # See http://bugs.icu-project.org/trac/ticket/11122
917 "/wd4595",
918 ] 923 ]
919
920 if (current_cpu == "x86") {
921 cflags += [
922 # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
923 # 4267. Example: short TruncTest(size_t x) { return x; }
924 # Since we disable 4244 we need to disable 4267 during migration.
925 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
926 "/wd4267",
927 ]
928 }
929 } 924 }
930 925
931 # VS xtree header file needs to be patched or 4702 (unreachable code 926 # VS xtree header file needs to be patched or 4702 (unreachable code
932 # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is 927 # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is
933 # not patched. 928 # not patched.
934 if (!msvs_xtree_patched && 929 if (!msvs_xtree_patched &&
935 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { 930 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) {
936 cflags += [ "/wd4702" ] # Unreachable code. 931 cflags += [ "/wd4702" ] # Unreachable code.
937 } 932 }
938 933
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 # 1507 #
1513 # configs -= [ "//build/config/compiler:default_symbols" ] 1508 # configs -= [ "//build/config/compiler:default_symbols" ]
1514 # configs += [ "//build/config/compiler:symbols" ] 1509 # configs += [ "//build/config/compiler:symbols" ]
1515 1510
1516 # Full symbols. 1511 # Full symbols.
1517 config("symbols") { 1512 config("symbols") {
1518 if (is_win) { 1513 if (is_win) {
1519 import("//build/toolchain/goma.gni") 1514 import("//build/toolchain/goma.gni")
1520 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. 1515 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
1521 1516
1522 if (is_win_fastlink && visual_studio_version != "2013") { 1517 if (is_win_fastlink) {
1523 # Tell VS 2015+ to create a PDB that references debug 1518 # Tell VS 2015+ to create a PDB that references debug
1524 # information in .obj and .lib files instead of copying 1519 # information in .obj and .lib files instead of copying
1525 # it all. This flag is incompatible with /PROFILE 1520 # it all. This flag is incompatible with /PROFILE
1526 ldflags = [ "/DEBUG:FASTLINK" ] 1521 ldflags = [ "/DEBUG:FASTLINK" ]
1527 } else { 1522 } else {
1528 ldflags = [ "/DEBUG" ] 1523 ldflags = [ "/DEBUG" ]
1529 } 1524 }
1530 } else { 1525 } else {
1531 if (is_mac || is_ios) { 1526 if (is_mac || is_ios) {
1532 cflags = [ "-gdwarf-2" ] 1527 cflags = [ "-gdwarf-2" ]
(...skipping 22 matching lines...) Expand all
1555 asmflags = cflags 1550 asmflags = cflags
1556 ldflags = [] 1551 ldflags = []
1557 } 1552 }
1558 } 1553 }
1559 1554
1560 # Minimal symbols. 1555 # Minimal symbols.
1561 config("minimal_symbols") { 1556 config("minimal_symbols") {
1562 if (is_win) { 1557 if (is_win) {
1563 # Linker symbols for backtraces only. 1558 # Linker symbols for backtraces only.
1564 cflags = [] 1559 cflags = []
1565 if (is_win_fastlink && visual_studio_version != "2013") { 1560 if (is_win_fastlink) {
1566 # Tell VS 2015+ to create a PDB that references debug 1561 # Tell VS 2015+ to create a PDB that references debug
1567 # information in .obj and .lib files instead of copying 1562 # information in .obj and .lib files instead of copying
1568 # it all. This flag is incompatible with /PROFILE 1563 # it all. This flag is incompatible with /PROFILE
1569 ldflags = [ "/DEBUG:FASTLINK" ] 1564 ldflags = [ "/DEBUG:FASTLINK" ]
1570 } else { 1565 } else {
1571 ldflags = [ "/DEBUG" ] 1566 ldflags = [ "/DEBUG" ]
1572 } 1567 }
1573 } else { 1568 } else {
1574 if (is_android) { 1569 if (is_android) {
1575 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 1570 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 1608
1614 if (is_ios || is_mac) { 1609 if (is_ios || is_mac) {
1615 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1610 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1616 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1611 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1617 config("enable_arc") { 1612 config("enable_arc") {
1618 common_flags = [ "-fobjc-arc" ] 1613 common_flags = [ "-fobjc-arc" ]
1619 cflags_objc = common_flags 1614 cflags_objc = common_flags
1620 cflags_objcc = common_flags 1615 cflags_objcc = common_flags
1621 } 1616 }
1622 } 1617 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698