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

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

Issue 1108173002: Roll //build, //native_client, and a few more targets of opportunity. Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Test fix Created 5 years, 8 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 | « build/config/sysroot.gni ('k') | build/escape_unicode.py » ('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/win/visual_studio_version.gni") 5 import("//build/config/win/visual_studio_version.gni")
6 6
7 # Compiler setup for the Windows SDK. Applied to all targets. 7 # Compiler setup for the Windows SDK. Applied to all targets.
8 config("sdk") { 8 config("sdk") {
9 # The include path is the stuff returned by the script. 9 # The include path is the stuff returned by the script.
10 #include_dirs = msvc_config[0] TODO(brettw) make this work. 10 #include_dirs = msvc_config[0] TODO(brettw) make this work.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ldflags += [ 90 ldflags += [
91 "/DELAYLOAD:dbghelp.dll", 91 "/DELAYLOAD:dbghelp.dll",
92 "/DELAYLOAD:dwmapi.dll", 92 "/DELAYLOAD:dwmapi.dll",
93 "/DELAYLOAD:shell32.dll", 93 "/DELAYLOAD:shell32.dll",
94 "/DELAYLOAD:uxtheme.dll", 94 "/DELAYLOAD:uxtheme.dll",
95 ] 95 ]
96 } 96 }
97 97
98 # Subsystem -------------------------------------------------------------------- 98 # Subsystem --------------------------------------------------------------------
99 99
100 # This is appended to the subsystem to specify a minimum version.
101 if (current_cpu == "x64") {
102 # The number after the comma is the minimum required OS version.
103 # 5.02 = Windows Server 2003.
104 subsystem_version_suffix = ",5.02"
105 } else {
106 # Don't specify a min version on x86.
107 subsystem_version_suffix = ""
108 }
109
100 config("console") { 110 config("console") {
101 ldflags = [ "/SUBSYSTEM:CONSOLE" ] 111 ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
102 } 112 }
103 config("windowed") { 113 config("windowed") {
104 ldflags = [ "/SUBSYSTEM:WINDOWS" ] 114 ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
105 } 115 }
106 116
107 # Incremental linking ---------------------------------------------------------- 117 # Incremental linking ----------------------------------------------------------
108 118
109 incremental_linking_on_switch = [ "/INCREMENTAL" ] 119 incremental_linking_on_switch = [ "/INCREMENTAL" ]
110 incremental_linking_off_switch = [ "/INCREMENTAL:NO" ] 120 incremental_linking_off_switch = [ "/INCREMENTAL:NO" ]
121 if (is_debug) {
122 default_incremental_linking_switch = incremental_linking_on_switch
123 } else {
124 default_incremental_linking_switch = incremental_linking_off_switch
125 }
111 126
112 # Applies incremental linking or not depending on the current configuration. 127 # Applies incremental linking or not depending on the current configuration.
113 config("default_incremental_linking") { 128 config("default_incremental_linking") {
114 if (is_debug) { 129 ldflags = default_incremental_linking_switch
115 ldflags = incremental_linking_on_switch
116 } else {
117 ldflags = incremental_linking_off_switch
118 }
119 } 130 }
120 131
121 # Explicitly on or off incremental linking 132 # Explicitly on or off incremental linking
122 config("incremental_linking") { 133 config("incremental_linking") {
123 ldflags = incremental_linking_on_switch 134 ldflags = incremental_linking_on_switch
124 } 135 }
125 config("no_incremental_linking") { 136 config("no_incremental_linking") {
126 ldflags = incremental_linking_off_switch 137 ldflags = incremental_linking_off_switch
127 } 138 }
128 139
129 # Some large modules can't handle incremental linking in some situations. This 140 # Some large modules can't handle incremental linking in some situations. This
130 # config should be applied to large modules to turn off incremental linking 141 # config should be applied to large modules to turn off incremental linking
131 # when it won't work. 142 # when it won't work.
132 config("default_large_module_incremental_linking") { 143 config("default_large_module_incremental_linking") {
133 if (!is_debug) { 144 if (symbol_level > 0 && (current_cpu == "x86" || !is_component_build)) {
134 # Default is always off in release build. 145 # When symbols are on, things get so large that the tools fail due to the
135 ldflags = incremental_linking_off_switch 146 # size of the .ilk files.
136 } else if ((symbol_level == 0 || symbol_level == 1) &&
137 (current_cpu == "x86" || !is_component_build)) {
138 # When full symbols are on, don't do incremental linking for large modules
139 # on 32-bit or in non-component mode as the toolchain fails due to the size
140 # of the .ilk files.
141 ldflags = incremental_linking_off_switch 147 ldflags = incremental_linking_off_switch
142 } else { 148 } else {
143 ldflags = incremental_linking_on_switch 149 # Otherwise just do the default incremental linking for this build type.
150 ldflags = default_incremental_linking_switch
144 } 151 }
145 } 152 }
146 153
147 # Character set ---------------------------------------------------------------- 154 # Character set ----------------------------------------------------------------
148 155
149 # Not including this config means "ansi" (8-bit system codepage). 156 # Not including this config means "ansi" (8-bit system codepage).
150 config("unicode") { 157 config("unicode") {
151 defines = [ 158 defines = [
152 "_UNICODE", 159 "_UNICODE",
153 "UNICODE", 160 "UNICODE",
(...skipping 11 matching lines...) Expand all
165 172
166 # Nominmax -------------------------------------------------------------------- 173 # Nominmax --------------------------------------------------------------------
167 174
168 # Some third party code defines NOMINMAX before including windows.h, which 175 # Some third party code defines NOMINMAX before including windows.h, which
169 # then causes warnings when it's been previously defined on the command line. 176 # then causes warnings when it's been previously defined on the command line.
170 # For such targets, this config can be removed. 177 # For such targets, this config can be removed.
171 178
172 config("nominmax") { 179 config("nominmax") {
173 defines = [ "NOMINMAX" ] 180 defines = [ "NOMINMAX" ]
174 } 181 }
OLDNEW
« no previous file with comments | « build/config/sysroot.gni ('k') | build/escape_unicode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698