| 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 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
| 7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
| 8 } | 8 } |
| 9 if (is_posix) { | 9 if (is_posix) { |
| 10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 # http://crbug.com/255186 | 738 # http://crbug.com/255186 |
| 739 "-Wno-deprecated-register", | 739 "-Wno-deprecated-register", |
| 740 | 740 |
| 741 # TODO(thakis): This used to be implied by -Wno-unused-function, | 741 # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 742 # which we no longer use. Check if it makes sense to remove | 742 # which we no longer use. Check if it makes sense to remove |
| 743 # this as well. http://crbug.com/316352 | 743 # this as well. http://crbug.com/316352 |
| 744 "-Wno-unneeded-internal-declaration", | 744 "-Wno-unneeded-internal-declaration", |
| 745 | 745 |
| 746 # TODO(thakis): Remove, http://crbug.com/263960 | 746 # TODO(thakis): Remove, http://crbug.com/263960 |
| 747 "-Wno-reserved-user-defined-literal", | 747 "-Wno-reserved-user-defined-literal", |
| 748 | |
| 749 # TODO(hans): Clean this up. Or disable with finer granularity. | |
| 750 "-Wno-unused-local-typedef", | |
| 751 ] | 748 ] |
| 752 } | 749 } |
| 753 if (gcc_version >= 48) { | 750 if (gcc_version >= 48) { |
| 754 cflags_cc += [ | 751 cflags_cc += [ |
| 755 # See comment for -Wno-c++11-narrowing. | 752 # See comment for -Wno-c++11-narrowing. |
| 756 "-Wno-narrowing", | 753 "-Wno-narrowing", |
| 757 # TODO(thakis): Remove, http://crbug.com/263960 | 754 # TODO(thakis): Remove, http://crbug.com/263960 |
| 758 "-Wno-literal-suffix", | 755 "-Wno-literal-suffix", |
| 759 ] | 756 ] |
| 760 } | 757 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 } | 908 } |
| 912 } | 909 } |
| 913 | 910 |
| 914 # Turns up the optimization level. On Windows, this implies whole program | 911 # Turns up the optimization level. On Windows, this implies whole program |
| 915 # optimization and link-time code generation which is very expensive and should | 912 # optimization and link-time code generation which is very expensive and should |
| 916 # be used sparingly. | 913 # be used sparingly. |
| 917 config("optimize_max") { | 914 config("optimize_max") { |
| 918 cflags = common_optimize_on_cflags | 915 cflags = common_optimize_on_cflags |
| 919 ldflags = common_optimize_on_ldflags | 916 ldflags = common_optimize_on_ldflags |
| 920 if (is_win) { | 917 if (is_win) { |
| 918 cflags -= [ |
| 919 "/Os", |
| 920 ] |
| 921 cflags += [ | 921 cflags += [ |
| 922 "/Ot", # Favor speed over size. | 922 "/Ot", # Favor speed over size. |
| 923 "/GL", # Whole program optimization. | |
| 924 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. | |
| 925 # Probably anything that this would catch that wouldn't be caught in a | |
| 926 # normal build isn't going to actually be a bug, so the incremental value | |
| 927 # of C4702 for PGO builds is likely very small. | |
| 928 "/wd4702", | |
| 929 ] | 923 ] |
| 924 if (is_official_build) { |
| 925 # TODO(GYP): TODO(dpranke): Should these only be on in an official |
| 926 # build, or on all the time? For now we'll require official build so |
| 927 # that the compile is clean. |
| 928 cflags += [ |
| 929 "/GL", # Whole program optimization. |
| 930 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
| 931 # Probably anything that this would catch that wouldn't be caught in a |
| 932 # normal build isn't going to actually be a bug, so the incremental |
| 933 # value of C4702 for PGO builds is likely very small. |
| 934 "/wd4702", |
| 935 ] |
| 936 ldflags += [ |
| 937 "/LTCG", |
| 938 ] |
| 939 } |
| 930 } else { | 940 } else { |
| 931 cflags += [ | 941 cflags += [ |
| 932 "-O2", | 942 "-O2", |
| 933 ] | 943 ] |
| 934 } | 944 } |
| 935 } | 945 } |
| 936 | 946 |
| 937 # Symbols ---------------------------------------------------------------------- | 947 # Symbols ---------------------------------------------------------------------- |
| 938 | 948 |
| 939 config("symbols") { | 949 config("symbols") { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 958 cflags += [ "-gsplit-dwarf" ] | 968 cflags += [ "-gsplit-dwarf" ] |
| 959 } | 969 } |
| 960 } | 970 } |
| 961 } | 971 } |
| 962 | 972 |
| 963 config("no_symbols") { | 973 config("no_symbols") { |
| 964 if (!is_win) { | 974 if (!is_win) { |
| 965 cflags = [ "-g0" ] | 975 cflags = [ "-g0" ] |
| 966 } | 976 } |
| 967 } | 977 } |
| OLD | NEW |