Commit 169ed777 authored by dpranke's avatar dpranke Committed by Commit bot

Re-land "Rework default GN symbol handling for win goma builds."

This relands r415325 with the neede fix.

TBR=thakis@chromium.org
BUG=634184

Review-Url: https://codereview.chromium.org/2296953002
Cr-Commit-Position: refs/heads/master@{#415435}
parent fcde3515
......@@ -1505,14 +1505,8 @@ config("default_optimization") {
config("symbols") {
if (is_win) {
import("//build/toolchain/goma.gni")
if (use_goma) {
# 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.
}
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
if (is_win_fastlink && visual_studio_version != "2013") {
# Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying
......
......@@ -6,6 +6,7 @@ import("//build/config/android/config.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/toolchain.gni")
declare_args() {
......@@ -82,6 +83,13 @@ if (symbol_level == -1) {
# With instrumentation enabled, debug info puts libchrome.so over 4gb, which
# causes the linker to produce an invalid ELF. http://crbug.com/574476
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) {
# 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,
......
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