Commit d2164444 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Do not use rsp files for windows compile

Creating and deleting rsp files is time consuming part when building on windows with warmed goma backend cache.
To reduce such bottleneck, we can use all compiler flags directory in command line instead of using rsp file.

This CL keeps using rsp file for linking because linking flags can be longer than compiles and the number of linking is relatively small compared to compile.

I took 3 time build stats for 'chrome' on 48 thread Z840 windows 10 with following args.gn and -j 500.
```
goma_dir = "C:\\src\\goma_client\\client\\out\\Release"
is_component_build = true
is_debug = false
strip_absolute_paths_from_debug_symbols = true
symbol_level = 0
target_cpu = "x86"
use_goma = true

is_clang = false
enable_nacl = false
use_lld = true
```

* With this CL
TotalSeconds: 279.9604737
TotalSeconds: 279.4099064
TotalSeconds: 273.8253059
Avg: 277.731895333333

* Without this CL
TotalSeconds: 325.0155664
TotalSeconds: 319.4094433
TotalSeconds: 299.9709
Avg: 314.798636566667


Bug: 796021
Change-Id: Ice959c196b6879b39962a3b628cdcf531884ec36
Reviewed-on: https://chromium-review.googlesource.com/832593Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529137}
parent 7f962d1f
......@@ -163,37 +163,35 @@ template("msvc_toolchain") {
}
tool("cc") {
rspfile = "{{output}}.rsp"
precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
# Label names may have spaces in them so the pdbname must be quoted. The
# source and output don't need to be quoted because GN knows they're a
# full file name and will quote automatically when necessary.
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
depsformat = "msvc"
description = "CC {{output}}"
outputs = [
"$object_subdir/{{source_name_part}}.obj",
]
rspfile_content = "$sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}"
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
}
tool("cxx") {
rspfile = "{{output}}.rsp"
precompiled_header_type = "msvc"
# The PDB name needs to be different between C and C++ compiled files.
pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb"
# See comment in CC tool about quoting.
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
depsformat = "msvc"
description = "CXX {{output}}"
outputs = [
"$object_subdir/{{source_name_part}}.obj",
]
rspfile_content = "$sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}"
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
}
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