summaryrefslogtreecommitdiffstats
path: root/build/toolchain/win
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-27 12:45:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-27 19:46:54 +0000
commit8f3218985dde74063ccc362da47803be163f3165 (patch)
tree177bd60384bfb8dc03fe439e82ff6f6061fdf59a /build/toolchain/win
parent258deb0a1977629e17c135a03080061ef9d1535b (diff)
downloadchromium_src-8f3218985dde74063ccc362da47803be163f3165.zip
chromium_src-8f3218985dde74063ccc362da47803be163f3165.tar.gz
chromium_src-8f3218985dde74063ccc362da47803be163f3165.tar.bz2
Add precompiled headers to GN build for large targets.
Turns on precompiled header support in the GN build on Windows, and adds the precompiled header config to most large-ish targets in the build. Removes Windows files from the precompiled header. This does not seem to affect the build speed much because most Chrome files don't depend on Windows any more. And windows.h injects typedefs and defines that conflict with some third party libraries and prevent using precompiled headers for those targets or any target that includes them. I counted ~50 files or bigger as large. The 50 file threshold is based on some previous approximate measurements (since the precompile step is an extra per-target compile, it can actually make small targets compile slower). For borderline cases, I added the precompiled header flag if I thought it was likely to have more files added, and didn't add it if I thought the target was likely to be static. CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1250273002 Cr-Commit-Position: refs/heads/master@{#340535}
Diffstat (limited to 'build/toolchain/win')
-rw-r--r--build/toolchain/win/BUILD.gn8
1 files changed, 2 insertions, 6 deletions
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index 454cdde..1ac3623 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -80,9 +80,7 @@ template("msvc_toolchain") {
tool("cc") {
rspfile = "{{output}}.rsp"
-
- # TODO(brettw) enable this when GN support in the binary has been rolled.
- #precompiled_header_type = "msvc"
+ precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb"
command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
depsformat = "msvc"
@@ -95,9 +93,7 @@ template("msvc_toolchain") {
tool("cxx") {
rspfile = "{{output}}.rsp"
-
- # TODO(brettw) enable this when GN support in the binary has been rolled.
- #precompiled_header_type = "msvc"
+ precompiled_header_type = "msvc"
# The PDB name needs to be different between C and C++ compiled files.
pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb"