Commit 9b4709d0 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Use /showIncludes:user instead of /showIncludes.

This requires goma client 193. Without it, this will cause every compile
job to fall back to local. It was released ~7pm Eastern on Mar 4 2020.

Goma should auto-update. You can see your current version in
`cat ~/goma/MANIFEST` / `type c:\src\goma\goma-win64\MANIFEST`
(the VERSION= line).

If it's out-of-date, you can explicitly update with
`~/goma/goma_ctl.py update` / `c:\src\goma\goma-win64\goma_ctl.bat update`

This flag omits system includes from /showIncludes output. This matches
what we do on non-Win (-MMD instead of -MD). We already make sure
we compile after system header updates (win sdk, libc++, compiler
builtin headers) due to changing the compile commandline after updates,
so there's no drawback to using this flag. It reduces the size of
.ninja_deps after a full build from 126MB to 49MB, reduces incremental
build time by 0.8s on Linux in a cross build (according to faster deps
load and fewer stats and a lower average stat time according to
-d states, probably because the SDK headers are in a fuse mount with
relatively slow stat()ing), and reduces the amount of data that ninja
needs to parse out of the compiler during a build of 'chrome' from
1.3GG to 627MB (according to `ninja -t deps`). Since that's on the
critical job scheduling path, it probably helps goma build speed too.

The flag was added in https://reviews.llvm.org/D75093

Bug: none
Change-Id: I7afe7ce2260b86993ba0cef9cb5a3da0b6803aa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078738
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747672}
parent 87dba632
...@@ -185,6 +185,16 @@ template("msvc_toolchain") { ...@@ -185,6 +185,16 @@ template("msvc_toolchain") {
coverage_wrapper = "" coverage_wrapper = ""
} }
if (toolchain_args.is_clang) {
# This flag omits system includes from /showIncludes output, to reduce the
# amount of data to parse and store in .ninja_deps. We do this on non-Windows too,
# and already make sure rebuilds after win sdk / libc++ / clang header updates happen via
# changing commandline flags.
show_includes = "/showIncludes:user"
} else {
show_includes = "/showIncludes"
}
tool("cc") { tool("cc") {
precompiled_header_type = "msvc" precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
...@@ -196,7 +206,7 @@ template("msvc_toolchain") { ...@@ -196,7 +206,7 @@ template("msvc_toolchain") {
description = "CC {{output}}" description = "CC {{output}}"
outputs = [ "$object_subdir/{{source_name_part}}.obj" ] outputs = [ "$object_subdir/{{source_name_part}}.obj" ]
command = "$coverage_wrapper$env_wrapper$cl /nologo /showIncludes $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" command = "$coverage_wrapper$env_wrapper$cl /nologo $show_includes $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
} }
tool("cxx") { tool("cxx") {
...@@ -210,7 +220,7 @@ template("msvc_toolchain") { ...@@ -210,7 +220,7 @@ template("msvc_toolchain") {
description = "CXX {{output}}" description = "CXX {{output}}"
outputs = [ "$object_subdir/{{source_name_part}}.obj" ] outputs = [ "$object_subdir/{{source_name_part}}.obj" ]
command = "$coverage_wrapper$env_wrapper$cl /nologo /showIncludes $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" command = "$coverage_wrapper$env_wrapper$cl /nologo $show_includes $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
} }
tool("rc") { tool("rc") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment