| 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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
| 9 import("//build/toolchain/ccache.gni") | 9 import("//build/toolchain/ccache.gni") |
| 10 | 10 |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 # On Android we kind of optimize some things that don't affect debugging | 1152 # On Android we kind of optimize some things that don't affect debugging |
| 1153 # much even when optimization is disabled to get the binary size down. | 1153 # much even when optimization is disabled to get the binary size down. |
| 1154 cflags = [ | 1154 cflags = [ |
| 1155 "-Os", | 1155 "-Os", |
| 1156 "-fdata-sections", | 1156 "-fdata-sections", |
| 1157 "-ffunction-sections", | 1157 "-ffunction-sections", |
| 1158 ] | 1158 ] |
| 1159 if (!using_sanitizer) { | 1159 if (!using_sanitizer) { |
| 1160 cflags += [ "-fomit-frame-pointer" ] | 1160 cflags += [ "-fomit-frame-pointer" ] |
| 1161 } | 1161 } |
| 1162 ldflags = common_optimize_on_ldflags | 1162 |
| 1163 # Don't use gc-sections since it can cause links to succeed when they |
| 1164 # actually shouldn't. http://crbug.com/159847 |
| 1165 ldflags = common_optimize_on_ldflags - [ "-Wl,--gc-sections" ] |
| 1163 } else { | 1166 } else { |
| 1164 cflags = [ "-O0" ] | 1167 cflags = [ "-O0" ] |
| 1165 ldflags = [] | 1168 ldflags = [] |
| 1166 } | 1169 } |
| 1167 } | 1170 } |
| 1168 | 1171 |
| 1169 # Turns up the optimization level. On Windows, this implies whole program | 1172 # Turns up the optimization level. On Windows, this implies whole program |
| 1170 # optimization and link-time code generation which is very expensive and should | 1173 # optimization and link-time code generation which is very expensive and should |
| 1171 # be used sparingly. | 1174 # be used sparingly. |
| 1172 config("optimize_max") { | 1175 config("optimize_max") { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 if (symbol_level == 0) { | 1297 if (symbol_level == 0) { |
| 1295 configs = [ ":no_symbols" ] | 1298 configs = [ ":no_symbols" ] |
| 1296 } else if (symbol_level == 1) { | 1299 } else if (symbol_level == 1) { |
| 1297 configs = [ ":minimal_symbols" ] | 1300 configs = [ ":minimal_symbols" ] |
| 1298 } else if (symbol_level == 2) { | 1301 } else if (symbol_level == 2) { |
| 1299 configs = [ ":symbols" ] | 1302 configs = [ ":symbols" ] |
| 1300 } else { | 1303 } else { |
| 1301 assert(false) | 1304 assert(false) |
| 1302 } | 1305 } |
| 1303 } | 1306 } |
| OLD | NEW |