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

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

Issue 2885213002: Optimize yasm even in debug builds (Closed)
Patch Set: Use variables to avoid replicating logic Created 3 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
« no previous file with comments | « no previous file | third_party/yasm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 69867ecea3d0c95922cc314e53b3f4419b043978..940e55c6c28f033dea5235f08f78ca4df6b6c6a5 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -294,8 +294,21 @@ config("default_crt") {
}
}
+# Use this to force the debug CRT for when building perf-critical build tools
+# that need to be fully optimized even in debug builds, for those times when the
+# debug CRT is part of the bottleneck. This also avoids *implicitly* defining
+# _DEBUG.
+config("release_crt") {
+ if (is_component_build) {
+ cflags = [ "/MD" ]
+ } else {
+ cflags = [ "/MT" ]
+ }
+}
+
config("dynamic_crt") {
if (is_debug) {
+ # This pulls in the DLL debug CRT and defines _DEBUG
cflags = [ "/MDd" ]
} else {
cflags = [ "/MD" ]
@@ -304,6 +317,7 @@ config("dynamic_crt") {
config("static_crt") {
if (is_debug) {
+ # This pulls in the static debug CRT and defines _DEBUG
cflags = [ "/MTd" ]
} else {
cflags = [ "/MT" ]
« no previous file with comments | « no previous file | third_party/yasm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698