Commit 15670f7f authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Stop deleting pdb file before links in official builds.

Reverts https://codereview.chromium.org/2519803003 , it shouldn't be needed
with lld.

(Running `ninja -t msvc` directly means ninja doesn't have to be in PATH,
since then clause 1 of how CreateProcessA() finds binaries can take effect:

1. The directory from which the application loaded.

Due to the delete, `ninja -t msvc` was run under `cmd /c`, which means we
did require ninja in PATH only for official builds. This removes this exception.
But we're also making sure ninja is in PATH for now until crbug.com/872740
is resolved, so this change is more a defense-in-depth thing.)

Bug: 665773,828472,828466
Change-Id: Ic86b255df1544fcb4744ff4d2bf1f3f0b25119c3
Reviewed-on: https://chromium-review.googlesource.com/1169302Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581905}
parent 502e56bf
...@@ -143,7 +143,7 @@ template("msvc_toolchain") { ...@@ -143,7 +143,7 @@ template("msvc_toolchain") {
# invocation requires higher cpu usage compared to ninja invocation, and # invocation requires higher cpu usage compared to ninja invocation, and
# the python wrapper is only needed to work around link.exe problems. # the python wrapper is only needed to work around link.exe problems.
# TODO(thakis): Remove wrapper once lld-link can merge manifests without # TODO(thakis): Remove wrapper once lld-link can merge manifests without
# relying on mt.exe being in %PATH% on Windows. # relying on mt.exe being in %PATH% on Windows, https://crbug.com/872740
linker_wrapper = "ninja -t msvc -e $env -- " # Note trailing space. linker_wrapper = "ninja -t msvc -e $env -- " # Note trailing space.
sys_lib_flags = "" sys_lib_flags = ""
} else { } else {
...@@ -296,21 +296,6 @@ template("msvc_toolchain") { ...@@ -296,21 +296,6 @@ template("msvc_toolchain") {
command = "$linker_wrapper$link /nologo ${sys_lib_flags}/OUT:$exename /PDB:$pdbname @$rspfile" command = "$linker_wrapper$link /nologo ${sys_lib_flags}/OUT:$exename /PDB:$pdbname @$rspfile"
if (host_os == "win") {
shellprefix = "cmd /c"
} else {
shellprefix = ""
}
not_needed([ "shellprefix" ])
if (is_official_build) {
# On bots, the binary's PDB grow and eventually exceed 4G, causing the
# link to fail. As there's no utility to keeping the PDB around
# incrementally anyway in this config (because we're doing
# non-incremental LTCG builds), delete it before linking.
command = "$shellprefix $python_path $tool_wrapper_path delete-file $pdbname && $command"
}
default_output_extension = ".exe" default_output_extension = ".exe"
default_output_dir = "{{root_out_dir}}" default_output_dir = "{{root_out_dir}}"
description = "LINK {{output}}" description = "LINK {{output}}"
......
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