Commit 108dc921 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Remove is_win_fastlink arg.

It only has an effect when not using clang and lld, and the default
build setup is to use clang and lld. Also, goma has dropped support
for non-clang compiles, and a main use case for is_win_fastlink
was being able to use goma. Finally, is_win_fastlink never worked
well.

Bug: 1053958
Change-Id: Ida8079da90157e3f02acf6b056fea3bef667f5bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2071243
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744291}
parent 380f5b56
......@@ -2237,24 +2237,13 @@ config("win_pdbaltpath") {
# Full symbols.
config("symbols") {
if (is_win) {
if (use_goma || is_clang) {
# Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
if (is_clang) {
cflags = [ "/Z7" ] # Debug information in the .obj files.
} else {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
}
if (is_win_fastlink && !use_lld) {
# TODO(hans): is_win_fastlink=true is incompatible with use_lld. However,
# some developers might have enabled it manually, so to ease the
# transition to lld, just ignore it rather than asserting. Eventually we
# want to assert instead.
# Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying
# it all. This flag is incompatible with /PROFILE
ldflags = [ "/DEBUG:FASTLINK" ]
} else if (is_clang && use_lld && use_ghash) {
if (is_clang && use_lld && use_ghash) {
cflags += [ "-gcodeview-ghash" ]
ldflags = [ "/DEBUG:GHASH" ]
} else {
......@@ -2265,19 +2254,13 @@ config("symbols") {
configs = [ ":win_pdbaltpath" ]
if (is_clang) {
# /DEBUG:FASTLINK requires every object file to have standalone debug
# information.
if (is_win_fastlink && !use_lld) {
cflags += [ "-fstandalone-debug" ]
} else {
# Use constructor debug mode. This option reduces debug info more than
# -fno-standalone-debug by emitting class type information only when
# constructors are emitted.
cflags += [
"-Xclang",
"-debug-info-kind=constructor",
]
}
# Use constructor debug mode. This option reduces debug info more than
# -fno-standalone-debug by emitting class type information only when
# constructors are emitted.
cflags += [
"-Xclang",
"-debug-info-kind=constructor",
]
}
} else {
cflags = []
......
......@@ -78,11 +78,6 @@ declare_args() {
# to use (for linkers that support this).
max_jobs_per_link = 8
# Tell VS to create a PDB that references information in .obj files rather
# than copying it all. This should improve linker performance. mspdbcmf.exe
# can be used to convert a fastlink pdb to a normal one.
is_win_fastlink = false
# Whether we're using a sample profile collected on an architecture different
# than the one we're compiling for.
#
......@@ -254,13 +249,6 @@ if (symbol_level == -1) {
} else {
symbol_level = 0
}
} else if (symbol_level == 2) {
if (is_win) {
# See crbug.com/630074
assert(is_win_fastlink || use_lld || !use_goma || is_clang,
"VC++ goma builds that use symbol_level 2 must use " +
"is_win_fastlink or use_lld.")
}
}
# Non-component debug builds with symbol_level = 2 are an undesirable (very slow
......
......@@ -152,8 +152,7 @@ config("compiler") {
if (!is_debug && !is_component_build) {
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
# release builds. These are implied by /PROFILE below, but /PROFILE is
# incompatible with /debug:fastlink.
# release builds.
# Release builds always want these optimizations, so enable them explicitly.
ldflags += [
"/OPT:REF",
......@@ -173,9 +172,7 @@ config("compiler") {
# PDB file by about 5%) but does not otherwise alter the output binary. It
# is enabled opportunistically for builds where it is not prohibited (not
# supported when incrementally linking, or using /debug:fastlink).
if (!is_win_fastlink) {
ldflags += [ "/PROFILE" ]
}
ldflags += [ "/PROFILE" ]
}
# arflags apply only to static_libraries. The normal linker configs are only
......
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