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