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 # configs += [ "//build/config/compiler/optimize_max" ] | 842 # configs += [ "//build/config/compiler/optimize_max" ] |
843 | 843 |
844 # Shared settings for both "optimize" and "optimize_max" configs. | 844 # Shared settings for both "optimize" and "optimize_max" configs. |
845 if (is_win) { | 845 if (is_win) { |
846 common_optimize_on_cflags = [ | 846 common_optimize_on_cflags = [ |
847 "/O2", | 847 "/O2", |
848 "/Ob2", # both explicit and auto inlining. | 848 "/Ob2", # both explicit and auto inlining. |
849 "/Oy-", # disable omitting frame pointers, must be after /o2. | 849 "/Oy-", # disable omitting frame pointers, must be after /o2. |
850 "/Os", # favor size over speed. | 850 "/Os", # favor size over speed. |
851 ] | 851 ] |
852 common_optimize_on_ldflags = [] | 852 if (!is_asan) { |
853 common_optimize_on_cflags += [ | |
854 # Put data in separate COMDATs. This allows the linker | |
855 # to put bit-identical constants at the same address even if | |
856 # they're unrelated constants, which saves binary size. | |
857 # This optimization can't be used when ASan is enabled because | |
858 # it is not compatible with the ASan ODR checker. | |
859 "/Gw", | |
Slava Chigrin
2015/01/19 12:41:23
Like that in GYP https://code.google.com/p/chromiu
| |
860 ] | |
861 } | |
862 common_optimize_on_ldflags = [ "/OPT:REF" ] | |
Slava Chigrin
2015/01/19 12:41:23
Like that
https://code.google.com/p/chromium/codes
| |
853 } else { | 863 } else { |
854 common_optimize_on_cflags = [ | 864 common_optimize_on_cflags = [ |
855 # Don't emit the GCC version ident directives, they just end up in the | 865 # Don't emit the GCC version ident directives, they just end up in the |
856 # .comment section taking up binary size. | 866 # .comment section taking up binary size. |
857 "-fno-ident", | 867 "-fno-ident", |
858 | 868 |
859 # Put data and code in their own sections, so that unused symbols | 869 # Put data and code in their own sections, so that unused symbols |
860 # can be removed at link time with --gc-sections. | 870 # can be removed at link time with --gc-sections. |
861 "-fdata-sections", | 871 "-fdata-sections", |
862 "-ffunction-sections", | 872 "-ffunction-sections", |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 cflags += [ "-gsplit-dwarf" ] | 996 cflags += [ "-gsplit-dwarf" ] |
987 } | 997 } |
988 } | 998 } |
989 } | 999 } |
990 | 1000 |
991 config("no_symbols") { | 1001 config("no_symbols") { |
992 if (!is_win) { | 1002 if (!is_win) { |
993 cflags = [ "-g0" ] | 1003 cflags = [ "-g0" ] |
994 } | 1004 } |
995 } | 1005 } |
OLD | NEW |