Rollup merge of #137676 - petrochenkov:winresp, r=Kobzol
linker: Fix escaping style for response files on Windows If we use a С/С++ compiler as linker, then Posix-style escaping should be used. Also temporarily fixup rustbuild to not fail at least in common scenarios, until the bootstrap compiler is updated. Fixes https://github.com/rust-lang/rust/issues/137498
This commit is contained in:
commit
f1cdd3be01
5 changed files with 37 additions and 13 deletions
|
@ -1726,8 +1726,12 @@ fn exec_linker(
|
|||
args.push_str(
|
||||
&Escape {
|
||||
arg: arg.to_str().unwrap(),
|
||||
// LLD also uses MSVC-like parsing for @-files by default when running on windows hosts
|
||||
is_like_msvc: sess.target.is_like_msvc || (cfg!(windows) && flavor.uses_lld()),
|
||||
// Windows-style escaping for @-files is used by
|
||||
// - all linkers targeting MSVC-like targets, including LLD
|
||||
// - all LLD flavors running on Windows hosts
|
||||
// С/С++ compilers use Posix-style escaping (except clang-cl, which we do not use).
|
||||
is_like_msvc: sess.target.is_like_msvc
|
||||
|| (cfg!(windows) && flavor.uses_lld() && !flavor.uses_cc()),
|
||||
}
|
||||
.to_string(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue