| 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 (cpu_arch == "mipsel" || cpu_arch == "mips64el") { | 9 if (cpu_arch == "mipsel" || cpu_arch == "mips64el") { |
| 10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 # configs += [ "//build/config/compiler/optimize_max" ] | 891 # configs += [ "//build/config/compiler/optimize_max" ] |
| 892 | 892 |
| 893 # Shared settings for both "optimize" and "optimize_max" configs. | 893 # Shared settings for both "optimize" and "optimize_max" configs. |
| 894 if (is_win) { | 894 if (is_win) { |
| 895 common_optimize_on_cflags = [ | 895 common_optimize_on_cflags = [ |
| 896 "/O2", | 896 "/O2", |
| 897 "/Ob2", # both explicit and auto inlining. | 897 "/Ob2", # both explicit and auto inlining. |
| 898 "/Oy-", # disable omitting frame pointers, must be after /o2. | 898 "/Oy-", # disable omitting frame pointers, must be after /o2. |
| 899 "/Os", # favor size over speed. | 899 "/Os", # favor size over speed. |
| 900 ] | 900 ] |
| 901 common_optimize_on_ldflags = [] | 901 if (!is_asan) { |
| 902 common_optimize_on_cflags += [ |
| 903 # Put data in separate COMDATs. This allows the linker |
| 904 # to put bit-identical constants at the same address even if |
| 905 # they're unrelated constants, which saves binary size. |
| 906 # This optimization can't be used when ASan is enabled because |
| 907 # it is not compatible with the ASan ODR checker. |
| 908 "/Gw", |
| 909 ] |
| 910 } |
| 911 common_optimize_on_ldflags = [ "/OPT:REF" ] |
| 902 } else { | 912 } else { |
| 903 common_optimize_on_cflags = [ | 913 common_optimize_on_cflags = [ |
| 904 # Don't emit the GCC version ident directives, they just end up in the | 914 # Don't emit the GCC version ident directives, they just end up in the |
| 905 # .comment section taking up binary size. | 915 # .comment section taking up binary size. |
| 906 "-fno-ident", | 916 "-fno-ident", |
| 907 | 917 |
| 908 # Put data and code in their own sections, so that unused symbols | 918 # Put data and code in their own sections, so that unused symbols |
| 909 # can be removed at link time with --gc-sections. | 919 # can be removed at link time with --gc-sections. |
| 910 "-fdata-sections", | 920 "-fdata-sections", |
| 911 "-ffunction-sections", | 921 "-ffunction-sections", |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 cflags += [ "-gsplit-dwarf" ] | 1045 cflags += [ "-gsplit-dwarf" ] |
| 1036 } | 1046 } |
| 1037 } | 1047 } |
| 1038 } | 1048 } |
| 1039 | 1049 |
| 1040 config("no_symbols") { | 1050 config("no_symbols") { |
| 1041 if (!is_win) { | 1051 if (!is_win) { |
| 1042 cflags = [ "-g0" ] | 1052 cflags = [ "-g0" ] |
| 1043 } | 1053 } |
| 1044 } | 1054 } |
| OLD | NEW |