Commit 8299aa51 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Ignore is_win_fastlink when linking with lld rather than asserting

lld doesn't support /debug:fastlink, and so we used to assert when
trying to use those two together.

However, as we're planning to switch over to lld by default, we don't
want to break the builds of those who have specified is_win_fastlink
manually. Instead, ignore the flag when linking with lld, and eventually
it will be phased out altogether.

Bug: 792131
Change-Id: I83ff749254d4dbc55aedbfc6e87702e8e8a06a23
Reviewed-on: https://chromium-review.googlesource.com/966225Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543714}
parent 83d6e446
...@@ -1968,8 +1968,11 @@ config("symbols") { ...@@ -1968,8 +1968,11 @@ config("symbols") {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
} }
if (is_win_fastlink) { if (is_win_fastlink && !use_lld) {
assert(!use_lld, "is_win_fastlink=true cannot be used with use_lld=true.") # 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 # 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
...@@ -1982,7 +1985,7 @@ config("symbols") { ...@@ -1982,7 +1985,7 @@ config("symbols") {
if (is_clang) { if (is_clang) {
# /DEBUG:FASTLINK requires every object file to have standalone debug # /DEBUG:FASTLINK requires every object file to have standalone debug
# information. # information.
if (is_win_fastlink) { if (is_win_fastlink && !use_lld) {
cflags += [ "-fstandalone-debug" ] cflags += [ "-fstandalone-debug" ]
} else { } else {
cflags += [ "-fno-standalone-debug" ] cflags += [ "-fno-standalone-debug" ]
......
...@@ -105,7 +105,7 @@ config("compiler") { ...@@ -105,7 +105,7 @@ config("compiler") {
ldflags = [ "/PROFILE" ] ldflags = [ "/PROFILE" ]
} else { } else {
if (!is_debug && !is_component_build) { if (!is_debug && !is_component_build) {
if (is_win_fastlink) { if (is_win_fastlink && !use_lld) {
# /PROFILE implies the following linker flags. Therefore if we are # /PROFILE implies the following linker flags. Therefore if we are
# skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK
# we should explicitly add these flags in order to avoid unintended # we should explicitly add these flags in order to avoid unintended
......
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