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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 "-fomit-frame-pointer", | 842 "-fomit-frame-pointer", |
843 "-fdata-sections", | 843 "-fdata-sections", |
844 "-ffunction-sections", | 844 "-ffunction-sections", |
845 ] | 845 ] |
846 ldflags = common_optimize_on_ldflags | 846 ldflags = common_optimize_on_ldflags |
847 } else { | 847 } else { |
848 cflags = [ "-O0" ] | 848 cflags = [ "-O0" ] |
849 } | 849 } |
850 } | 850 } |
851 | 851 |
852 # On Windows, turns up the optimization level. This implies whole program | 852 # Turns up the optimization level. On Windows, this implies whole program |
853 # optimization and link-time code generation which is very expensive and should | 853 # optimization and link-time code generation which is very expensive and should |
854 # be used sparingly. For non-Windows, this is the same as "optimize". | 854 # be used sparingly. |
855 config("optimize_max") { | 855 config("optimize_max") { |
856 cflags = common_optimize_on_cflags | 856 cflags = common_optimize_on_cflags |
857 ldflags = common_optimize_on_ldflags | 857 ldflags = common_optimize_on_ldflags |
858 if (is_win) { | 858 if (is_win) { |
859 cflags += [ | 859 cflags += [ |
860 "/Ot", # Favor speed over size. | 860 "/Ot", # Favor speed over size. |
861 "/GL", # Whole program optimization. | 861 "/GL", # Whole program optimization. |
862 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. | 862 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
863 # Probably anything that this would catch that wouldn't be caught in a | 863 # Probably anything that this would catch that wouldn't be caught in a |
864 # normal build isn't going to actually be a bug, so the incremental value | 864 # normal build isn't going to actually be a bug, so the incremental value |
(...skipping 25 matching lines...) Expand all Loading... |
890 } else { | 890 } else { |
891 cflags = [ "-g1" ] | 891 cflags = [ "-g1" ] |
892 } | 892 } |
893 } | 893 } |
894 | 894 |
895 config("no_symbols") { | 895 config("no_symbols") { |
896 if (!is_win) { | 896 if (!is_win) { |
897 cflags = [ "-g0" ] | 897 cflags = [ "-g0" ] |
898 } | 898 } |
899 } | 899 } |
OLD | NEW |