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

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

Issue 277583006: Implement review comment on GN optimization setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 9
10 declare_args() { 10 declare_args() {
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698