Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 832583007: Add GN files for chrome_elf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues after review. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698