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

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

Issue 709593004: Make *some* version of the Win GN build work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: turn off tcmalloc altogether Created 6 years, 1 month 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
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 if (is_posix) { 9 if (is_posix) {
10 import("//build/config/gcc/gcc_version.gni") 10 import("//build/config/gcc/gcc_version.gni")
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 } 910 }
911 } 911 }
912 912
913 # Turns up the optimization level. On Windows, this implies whole program 913 # Turns up the optimization level. On Windows, this implies whole program
914 # optimization and link-time code generation which is very expensive and should 914 # optimization and link-time code generation which is very expensive and should
915 # be used sparingly. 915 # be used sparingly.
916 config("optimize_max") { 916 config("optimize_max") {
917 cflags = common_optimize_on_cflags 917 cflags = common_optimize_on_cflags
918 ldflags = common_optimize_on_ldflags 918 ldflags = common_optimize_on_ldflags
919 if (is_win) { 919 if (is_win) {
920 cflags -= [
921 "/Os",
922 ]
920 cflags += [ 923 cflags += [
921 "/Ot", # Favor speed over size. 924 "/Ot", # Favor speed over size.
922 "/GL", # Whole program optimization.
923 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
924 # Probably anything that this would catch that wouldn't be caught in a
925 # normal build isn't going to actually be a bug, so the incremental value
926 # of C4702 for PGO builds is likely very small.
927 "/wd4702",
928 ] 925 ]
926 if (is_official_build) {
927 # TODO(GYP): TODO(dpranke): Should these only be on in an official
928 # build, or on all the time? For now we'll require official build so
929 # that the compile is clean.
930 cflags += [
931 "/GL", # Whole program optimization.
932 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
933 # Probably anything that this would catch that wouldn't be caught in a
934 # normal build isn't going to actually be a bug, so the incremental
935 # value of C4702 for PGO builds is likely very small.
936 "/wd4702",
937 ]
938 ldflags += [
939 "/LTCG",
940 ]
941 }
929 } else { 942 } else {
930 cflags += [ 943 cflags += [
931 "-O2", 944 "-O2",
932 ] 945 ]
933 } 946 }
934 } 947 }
935 948
936 # Symbols ---------------------------------------------------------------------- 949 # Symbols ----------------------------------------------------------------------
937 950
938 config("symbols") { 951 config("symbols") {
(...skipping 18 matching lines...) Expand all
957 cflags += [ "-gsplit-dwarf" ] 970 cflags += [ "-gsplit-dwarf" ]
958 } 971 }
959 } 972 }
960 } 973 }
961 974
962 config("no_symbols") { 975 config("no_symbols") {
963 if (!is_win) { 976 if (!is_win) {
964 cflags = [ "-g0" ] 977 cflags = [ "-g0" ]
965 } 978 }
966 } 979 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698