Commit 61560121 authored by brucedawson's avatar brucedawson Committed by Commit bot

Disable compilation symbols on goma builds

Goma builds necessarily don't use PDBs. That means that symbols have to be put in .obj files. This means that symbols get stored redundantly, which makes the job of the linker much harder - greatly increased linker working sets and greatly increased link times.

gyp deals with this by disabling symbol generation in the compile stage for goma builds. gn has not been doing this, which has made gn goma builds *significantly* slower, unless symbol_level is explicitly set to 1.

gyp has an override switch (win_z7) but it appears that nobody uses it so for now I am leaving it unimplemented in gn.

BUG=630074

Review-Url: https://codereview.chromium.org/2174873002
Cr-Commit-Position: refs/heads/master@{#407251}
parent 92825d34
...@@ -1487,7 +1487,10 @@ config("symbols") { ...@@ -1487,7 +1487,10 @@ config("symbols") {
if (is_win) { if (is_win) {
import("//build/toolchain/goma.gni") import("//build/toolchain/goma.gni")
if (use_goma) { if (use_goma) {
cflags = [ "/Z7" ] # No PDB file # Disable symbols during goma compilation because otherwise the redundant
# debug information (repeated in every .obj file) makes linker memory
# consumption and link times unsustainable (crbug.com/630074).
cflags = []
} else { } else {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
} }
......
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