OLD | NEW |
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 Loading... |
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" ] |
111 if (is_debug) { | 121 if (is_debug) { |
112 default_incremental_linking_switch = incremental_linking_on_switch | 122 default_incremental_linking_switch = incremental_linking_on_switch |
113 } else { | 123 } else { |
114 default_incremental_linking_switch = incremental_linking_off_switch | 124 default_incremental_linking_switch = incremental_linking_off_switch |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 172 |
163 # Nominmax -------------------------------------------------------------------- | 173 # Nominmax -------------------------------------------------------------------- |
164 | 174 |
165 # Some third party code defines NOMINMAX before including windows.h, which | 175 # Some third party code defines NOMINMAX before including windows.h, which |
166 # 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. |
167 # For such targets, this config can be removed. | 177 # For such targets, this config can be removed. |
168 | 178 |
169 config("nominmax") { | 179 config("nominmax") { |
170 defines = [ "NOMINMAX" ] | 180 defines = [ "NOMINMAX" ] |
171 } | 181 } |
OLD | NEW |