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/920762 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Peter Collingbourne <pcc@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#537221} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 1f49f5de7b13240487312daab67135e35bce93bc
This commit is contained in:
Родитель
fa77307d55
Коммит
fba4f0c50e
|
@ -299,12 +299,19 @@ template("msvc_toolchain") {
|
||||||
|
|
||||||
command = "$python_path $tool_wrapper_path link-wrapper $env False $link /nologo /OUT:$exename /PDB:$pdbname @$rspfile"
|
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) {
|
if (is_official_build) {
|
||||||
# On bots, the binary's PDB grow and eventually exceed 4G, causing the
|
# 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
|
# link to fail. As there's no utility to keeping the PDB around
|
||||||
# incrementally anyway in this config (because we're doing
|
# incrementally anyway in this config (because we're doing
|
||||||
# non-incremental LTCG builds), delete it before linking.
|
# 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 != "") {
|
if (linkrepro_root_dir != "") {
|
||||||
|
@ -314,7 +321,7 @@ template("msvc_toolchain") {
|
||||||
# because the linker doesn't generate the directory specified to the
|
# because the linker doesn't generate the directory specified to the
|
||||||
# /LINKREPRO flag if it doesn't exist.
|
# /LINKREPRO flag if it doesn't exist.
|
||||||
linkrepro_dir = "$linkrepro_root_dir\\{{target_output_name}}"
|
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"
|
default_output_extension = ".exe"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче