Commit a6de3464 authored by sebmarchand's avatar sebmarchand Committed by Commit bot

Add support for link repros and use it on net_perftests.

This is a debugging feature that will be used on the official Win64 continuous builder to get a repro for some linker failures that we're observing. Having a link repro is the only way for us to report this kind of error to Microsoft in order for them to fix it (we haven't been able to reproduce this linker failure locally, but this hit us really often on the official builders).

BUG=669854
TBR=bengr@chromium.org

Review-Url: https://codereview.chromium.org/2570483004
Cr-Commit-Position: refs/heads/master@{#438621}
parent fa5a4db6
......@@ -44,6 +44,20 @@ declare_args() {
# Whether or not we should turn on incremental WPO. Only affects the VS
# Windows build.
use_incremental_wpo = false
# Root directory that will store the MSVC link repro. This should only be
# used for debugging purposes on the builders where a MSVC linker flakyness
# has been observed. The targets for which a link repro should be generated
# should add somethink like this to their configuration:
# if (linkrepro_root_dir != "") {
# ldflags = ["/LINKREPRO:" + linkrepro_root_dir + "/" + target_name]
# }
#
# Note that doing a link repro uses a lot of disk space and slows down the
# build, so this shouldn't be enabled on too many targets.
#
# See crbug.com/669854.
linkrepro_root_dir = ""
}
declare_args() {
......
......@@ -272,6 +272,16 @@ template("msvc_toolchain") {
command = "cmd /c $python_path $tool_wrapper_path delete-file $pdbname && $command"
}
if (linkrepro_root_dir != "") {
# Create the directory that will receive the link repro for this target
# if needed. Note that this will create one directory per link target
# even if this target doesn't generate a link repro. This is necessary
# because the linker doesn't generate the directory specified to the
# /LINKREPRO flag if it doesn't exist.
linkrepro_dir = "$linkrepro_root_dir\\{{target_output_name}}"
command = "cmd /c mkdir $linkrepro_dir && $command"
}
default_output_extension = ".exe"
default_output_dir = "{{root_out_dir}}"
description = "LINK {{output}}"
......
......@@ -1602,6 +1602,13 @@ if (!is_ios) {
} else {
sources -= [ "proxy/proxy_resolver_perftest.cc" ]
}
# Some linker failures have been observed for this target on the Win64
# continuous builder, see crbug.com/659369.
# TODO(sebmarchand): Remove this once we have some data.
if (is_win && linkrepro_root_dir != "") {
ldflags = [ "/LINKREPRO:" + linkrepro_root_dir + "/" + target_name ]
}
}
}
......
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