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/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1361 if (is_win) { | 1361 if (is_win) { |
1362 cflags = [ | 1362 cflags = [ |
1363 "/Od", # Disable optimization. | 1363 "/Od", # Disable optimization. |
1364 "/Ob0", # Disable all inlining (on by default). | 1364 "/Ob0", # Disable all inlining (on by default). |
1365 ] | 1365 ] |
1366 } else if (is_android && !android_full_debug) { | 1366 } else if (is_android && !android_full_debug) { |
1367 # On Android we kind of optimize some things that don't affect debugging | 1367 # On Android we kind of optimize some things that don't affect debugging |
1368 # much even when optimization is disabled to get the binary size down. | 1368 # much even when optimization is disabled to get the binary size down. |
1369 cflags = [ | 1369 cflags = [ |
1370 "-Os", | 1370 "-Os", |
1371 "-fdata-sections", | 1371 "-fdata-sections", |
agrieve
2016/10/03 18:34:17
Would it make sense to also remove -fdata-sections
Lei Zhang
2016/10/03 20:45:50
Done.
| |
1372 "-ffunction-sections", | 1372 "-ffunction-sections", |
1373 ] | 1373 ] |
1374 | |
1375 # Don't use gc-sections since it can cause links to succeed when they | |
1376 # actually shouldn't. http://crbug.com/159847 | |
1377 ldflags = common_optimize_on_ldflags - [ "-Wl,--gc-sections" ] | |
1378 } else { | 1374 } else { |
1379 cflags = [ "-O0" ] | 1375 cflags = [ "-O0" ] |
1380 ldflags = [] | 1376 ldflags = [] |
1381 } | 1377 } |
1382 } | 1378 } |
1383 | 1379 |
1384 # Turns up the optimization level. On Windows, this implies whole program | 1380 # Turns up the optimization level. On Windows, this implies whole program |
1385 # optimization and link-time code generation which is very expensive and should | 1381 # optimization and link-time code generation which is very expensive and should |
1386 # be used sparingly. | 1382 # be used sparingly. |
1387 config("optimize_max") { | 1383 config("optimize_max") { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1588 | 1584 |
1589 if (is_ios || is_mac) { | 1585 if (is_ios || is_mac) { |
1590 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1586 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1591 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1587 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1592 config("enable_arc") { | 1588 config("enable_arc") { |
1593 common_flags = [ "-fobjc-arc" ] | 1589 common_flags = [ "-fobjc-arc" ] |
1594 cflags_objc = common_flags | 1590 cflags_objc = common_flags |
1595 cflags_objcc = common_flags | 1591 cflags_objcc = common_flags |
1596 } | 1592 } |
1597 } | 1593 } |
OLD | NEW |