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

Unified Diff: build/config/BUILD.gn

Issue 1207903002: Windows precompiled header support in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/BUILD.gn
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 9fc86fd2703a36aa877d146a9b158b900e94a577..acd02d7e0799b1ab7cd5532503cbf91635bb8f91 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -396,3 +396,21 @@ config("default_libs") {
libs = [ "dl" ]
}
}
+
+config("precompiled_headers") {
+ if (is_win) {
+ #if (false) {
+ # This is a string rather than a file GN knows about. It has to match
+ # exactly what's in the /FI flag below, and what might appear in the source
+ # code in quotes for an #include directive.
+ precompiled_header = "build/precompile.h"
+
+ # This is a file that GN will compile with the above header. It will be
+ # implicitly added to the sources (potentially multiple times, with one
+ # variant for each language used in the target).
+ precompiled_source = "//build/precompile.cc"
+
+ # Force include the header.
+ cflags = [ "/FI$precompiled_header" ]
+ }
+}
« no previous file with comments | « base/BUILD.gn ('k') | tools/gn/BUILD.gn » ('j') | tools/gn/config_values_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698