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

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: 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
« no previous file with comments | « base/allocator/BUILD.gn ('k') | build/secondary/third_party/nss/BUILD.gn » ('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 (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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 906 }
907 } 907 }
908 908
909 # Turns up the optimization level. On Windows, this implies whole program 909 # Turns up the optimization level. On Windows, this implies whole program
910 # optimization and link-time code generation which is very expensive and should 910 # optimization and link-time code generation which is very expensive and should
911 # be used sparingly. 911 # be used sparingly.
912 config("optimize_max") { 912 config("optimize_max") {
913 cflags = common_optimize_on_cflags 913 cflags = common_optimize_on_cflags
914 ldflags = common_optimize_on_ldflags 914 ldflags = common_optimize_on_ldflags
915 if (is_win) { 915 if (is_win) {
916 cflags -= [
917 "/Os",
918 ]
916 cflags += [ 919 cflags += [
917 "/Ot", # Favor speed over size. 920 "/Ot", # Favor speed over size.
918 "/GL", # Whole program optimization.
919 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
920 # Probably anything that this would catch that wouldn't be caught in a
921 # normal build isn't going to actually be a bug, so the incremental value
922 # of C4702 for PGO builds is likely very small.
923 "/wd4702",
924 ] 921 ]
922 if (is_official_build) {
923 # TODO(GYP): TODO(dpranke): Should these only be on in an official
924 # build, or on all the time? For now we'll require official build so
scottmg 2014/11/07 03:38:11 https://code.google.com/p/chromium/codesearch#chro
Dirk Pranke 2014/11/07 03:43:26 There seemed to be a few other places that explici
925 # that the compile is clean.
926 cflags += [
927 "/GL", # Whole program optimization.
928 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
929 # Probably anything that this would catch that wouldn't be caught in a
930 # normal build isn't going to actually be a bug, so the incremental
931 # value of C4702 for PGO builds is likely very small.
932 "/wd4702",
933 ]
934 ldflags += [
935 "/LTCG",
936 ]
937 }
925 } else { 938 } else {
926 cflags += [ 939 cflags += [
927 "-O2", 940 "-O2",
928 ] 941 ]
929 } 942 }
930 } 943 }
931 944
932 # Symbols ---------------------------------------------------------------------- 945 # Symbols ----------------------------------------------------------------------
933 946
934 config("symbols") { 947 config("symbols") {
(...skipping 18 matching lines...) Expand all
953 cflags += [ "-gsplit-dwarf" ] 966 cflags += [ "-gsplit-dwarf" ]
954 } 967 }
955 } 968 }
956 } 969 }
957 970
958 config("no_symbols") { 971 config("no_symbols") {
959 if (!is_win) { 972 if (!is_win) {
960 cflags = [ "-g0" ] 973 cflags = [ "-g0" ]
961 } 974 }
962 } 975 }
OLDNEW
« no previous file with comments | « base/allocator/BUILD.gn ('k') | build/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698