| 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 | 9 |
| 10 declare_args() { | 10 declare_args() { |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 ] | 699 ] |
| 700 } else if (is_android && !android_full_debug) { | 700 } else if (is_android && !android_full_debug) { |
| 701 # On Android we kind of optimize some things that don't affect debugging | 701 # On Android we kind of optimize some things that don't affect debugging |
| 702 # much even when optimization is disabled to get the binary size down. | 702 # much even when optimization is disabled to get the binary size down. |
| 703 cflags = [ | 703 cflags = [ |
| 704 "-Os", | 704 "-Os", |
| 705 "-fomit-frame-pointer", | 705 "-fomit-frame-pointer", |
| 706 "-fdata-sections", | 706 "-fdata-sections", |
| 707 "-ffunction-sections", | 707 "-ffunction-sections", |
| 708 ] | 708 ] |
| 709 ldflags = [ | 709 ldflags = common_optimize_on_ldflags |
| 710 "-Wl,-O1", | |
| 711 "-Wl,--as-needed", | |
| 712 "-Wl,--gc-sections", | |
| 713 ] | |
| 714 } else { | 710 } else { |
| 715 cflags = [ "-O0" ] | 711 cflags = [ "-O0" ] |
| 716 } | 712 } |
| 717 } | 713 } |
| 718 | 714 |
| 719 # On Windows, turns up the optimization level. This implies whole program | 715 # On Windows, turns up the optimization level. This implies whole program |
| 720 # optimization and link-time code generation which is very expensive and should | 716 # optimization and link-time code generation which is very expensive and should |
| 721 # be used sparingly. For non-Windows, this is the same as "optimize". | 717 # be used sparingly. For non-Windows, this is the same as "optimize". |
| 722 config("optimize_max") { | 718 config("optimize_max") { |
| 723 cflags = common_optimize_on_cflags | 719 cflags = common_optimize_on_cflags |
| (...skipping 25 matching lines...) Expand all Loading... |
| 749 cflags = [ "-g1" ] | 745 cflags = [ "-g1" ] |
| 750 } | 746 } |
| 751 } | 747 } |
| 752 | 748 |
| 753 config("no_symbols") { | 749 config("no_symbols") { |
| 754 if (!is_win) { | 750 if (!is_win) { |
| 755 cflags = [ "-g0" ] | 751 cflags = [ "-g0" ] |
| 756 } | 752 } |
| 757 } | 753 } |
| 758 | 754 |
| OLD | NEW |