Commit 1f49f5de authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

build: Fix a Windows-ism in the msvc_toolchain rules.

Avoid using "cmd /c" on non-Windows platforms. This fixes the Windows
cross build in a couple of cases.

Change-Id: I4da82e50abbc392dbd90afe34befacc9bce9a593
Reviewed-on: https://chromium-review.googlesource.com/920762Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537221}
parent 7bff00e0
......@@ -299,12 +299,19 @@ template("msvc_toolchain") {
command = "$python_path $tool_wrapper_path link-wrapper $env False $link /nologo /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 = "cmd /c $python_path $tool_wrapper_path delete-file $pdbname && $command"
command = "$shellprefix $python_path $tool_wrapper_path delete-file $pdbname && $command"
}
if (linkrepro_root_dir != "") {
......@@ -314,7 +321,7 @@ template("msvc_toolchain") {
# 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"
command = "$shellprefix mkdir $linkrepro_dir && $command"
}
default_output_extension = ".exe"
......
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