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

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

Issue 2425043002: GN: Fix Debug flags. Fix Windows build. (Closed)
Patch Set: Created 4 years, 2 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 | runtime/platform/globals.h » ('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 (current_cpu == "arm") { 6 if (current_cpu == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
10 import("//build/config/mips.gni") 10 import("//build/config/mips.gni")
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] 713 common_optimize_on_ldflags += [ "-Wl,--as-needed" ]
714 } 714 }
715 } 715 }
716 } 716 }
717 717
718 # Default "optimization on" config. On Windows, this favors size over speed. 718 # Default "optimization on" config. On Windows, this favors size over speed.
719 config("optimize") { 719 config("optimize") {
720 if (is_win) { 720 if (is_win) {
721 # Favor size over speed, /O1 must be before the common flags. The GYP 721 # Favor size over speed, /O1 must be before the common flags. The GYP
722 # build also specifies /Os and /GF but these are implied by /O1. 722 # build also specifies /Os and /GF but these are implied by /O1.
723 cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] 723 cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
724 } else if (is_android) { 724 } else if (is_android) {
725 cflags = [ "-Os" ] + common_optimize_on_cflags # Favor size over speed. 725 cflags = [ "-Os" ] + common_optimize_on_cflags # Favor size over speed.
726 } else { 726 } else {
727 cflags = [ "-O3" ] + common_optimize_on_cflags 727 cflags = [ "-O3" ] + common_optimize_on_cflags
728 } 728 }
729 ldflags = common_optimize_on_ldflags 729 ldflags = common_optimize_on_ldflags
730 } 730 }
731 731
732 # Turn off optimizations. 732 # Turn off optimizations.
733 config("no_optimize") { 733 config("no_optimize") {
734 if (is_win) { 734 if (is_win) {
735 cflags = [ 735 cflags = [
736 "/Od", # Disable optimization. 736 "/O2", # Do some optimizations.
737 "/Oy-", # Disable omitting frame pointers, must be after /O2.
737 "/Ob0", # Disable all inlining (on by default). 738 "/Ob0", # Disable all inlining (on by default).
738 "/RTC1", # Runtime checks for stack frame and uninitialized variables.
739 ] 739 ]
740 } else if (is_android) { 740 } else if (is_android) {
741 # On Android we kind of optimize some things that don't affect debugging 741 # On Android we kind of optimize some things that don't affect debugging
742 # much even when optimization is disabled to get the binary size down. 742 # much even when optimization is disabled to get the binary size down.
743 cflags = [ 743 cflags = [
744 "-Os", 744 "-Os",
745 "-fdata-sections", 745 "-fdata-sections",
746 "-ffunction-sections", 746 "-ffunction-sections",
747 ] 747 ]
748 ldflags = common_optimize_on_ldflags 748 ldflags = common_optimize_on_ldflags
(...skipping 17 matching lines...) Expand all
766 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. 766 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
767 } 767 }
768 ldflags = [ "/DEBUG" ] 768 ldflags = [ "/DEBUG" ]
769 } else { 769 } else {
770 cflags = [ 770 cflags = [
771 "-g3", 771 "-g3",
772 "-ggdb3", 772 "-ggdb3",
773 ] 773 ]
774 } 774 }
775 } 775 }
OLDNEW
« no previous file with comments | « no previous file | runtime/platform/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698