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

Unified Diff: build/config/win/BUILD.gn

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 4ca22f7fa414b29f4aab6d13290a7c40dc3ba4c9..8b0910f9fd24f306f58148a582674e82efad72bd 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -97,25 +97,36 @@ config("common_linker_setup") {
# Subsystem --------------------------------------------------------------------
+# This is appended to the subsystem to specify a minimum version.
+if (current_cpu == "x64") {
+ # The number after the comma is the minimum required OS version.
+ # 5.02 = Windows Server 2003.
+ subsystem_version_suffix = ",5.02"
+} else {
+ # Don't specify a min version on x86.
+ subsystem_version_suffix = ""
+}
+
config("console") {
- ldflags = [ "/SUBSYSTEM:CONSOLE" ]
+ ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
}
config("windowed") {
- ldflags = [ "/SUBSYSTEM:WINDOWS" ]
+ ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
}
# Incremental linking ----------------------------------------------------------
incremental_linking_on_switch = [ "/INCREMENTAL" ]
incremental_linking_off_switch = [ "/INCREMENTAL:NO" ]
+if (is_debug) {
+ default_incremental_linking_switch = incremental_linking_on_switch
+} else {
+ default_incremental_linking_switch = incremental_linking_off_switch
+}
# Applies incremental linking or not depending on the current configuration.
config("default_incremental_linking") {
- if (is_debug) {
- ldflags = incremental_linking_on_switch
- } else {
- ldflags = incremental_linking_off_switch
- }
+ ldflags = default_incremental_linking_switch
}
# Explicitly on or off incremental linking
@@ -130,17 +141,13 @@ config("no_incremental_linking") {
# config should be applied to large modules to turn off incremental linking
# when it won't work.
config("default_large_module_incremental_linking") {
- if (!is_debug) {
- # Default is always off in release build.
- ldflags = incremental_linking_off_switch
- } else if ((symbol_level == 0 || symbol_level == 1) &&
- (current_cpu == "x86" || !is_component_build)) {
- # When full symbols are on, don't do incremental linking for large modules
- # on 32-bit or in non-component mode as the toolchain fails due to the size
- # of the .ilk files.
+ if (symbol_level > 0 && (current_cpu == "x86" || !is_component_build)) {
+ # When symbols are on, things get so large that the tools fail due to the
+ # size of the .ilk files.
ldflags = incremental_linking_off_switch
} else {
- ldflags = incremental_linking_on_switch
+ # Otherwise just do the default incremental linking for this build type.
+ ldflags = default_incremental_linking_switch
}
}
« no previous file with comments | « build/config/sysroot.gni ('k') | build/escape_unicode.py » ('j') | mojo/public/tools/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698