Commit 64fea5e2 authored by dpranke's avatar dpranke Committed by Commit bot

Rework default GN symbol handling for win goma builds.

Win goma builds do not support PDB files, so trying to build with
full symbols is very painful. Previously we would default to "full
symbols" but silently turn off symbols if using goma; this CL
restructures things so that we default to "minimal symbols" if
using goma (and visual studio's compiler).

R=brucedawson@chromium.org, brettw@chromium.org, thakis@chromium.org
BUG=634184

Review-Url: https://codereview.chromium.org/2215433002
Cr-Commit-Position: refs/heads/master@{#415325}
parent 8dadcde6
...@@ -1503,14 +1503,8 @@ config("default_optimization") { ...@@ -1503,14 +1503,8 @@ config("default_optimization") {
config("symbols") { config("symbols") {
if (is_win) { if (is_win) {
import("//build/toolchain/goma.gni") import("//build/toolchain/goma.gni")
if (use_goma) { cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
# 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 {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
}
if (is_win_fastlink && visual_studio_version != "2013") { if (is_win_fastlink && visual_studio_version != "2013") {
# Tell VS 2015+ to create a PDB that references debug # Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying # information in .obj and .lib files instead of copying
......
...@@ -82,6 +82,13 @@ if (symbol_level == -1) { ...@@ -82,6 +82,13 @@ if (symbol_level == -1) {
# With instrumentation enabled, debug info puts libchrome.so over 4gb, which # With instrumentation enabled, debug info puts libchrome.so over 4gb, which
# causes the linker to produce an invalid ELF. http://crbug.com/574476 # causes the linker to produce an invalid ELF. http://crbug.com/574476
symbol_level = 0 symbol_level = 0
} else if (is_win && use_goma && !is_clang) {
# goma doesn't support PDB files, so we disable symbols during goma
# compilation because otherwise the redundant debug information generated
# by visual studio (repeated in every .obj file) makes linker
# memory consumption and link times unsustainable (crbug.com/630074).
# Clang on windows does not have this issue.
symbol_level = 1
} else if (!is_linux || is_debug || is_official_build || is_chromecast) { } else if (!is_linux || is_debug || is_official_build || is_chromecast) {
# Linux is slowed by having symbols as part of the target binary, whereas # Linux is slowed by having symbols as part of the target binary, whereas
# Mac and Windows have them separate, so in Release Linux, default them off, # Mac and Windows have them separate, so in Release Linux, default them off,
......
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