about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-05 19:11:04 +0000
committerbors <bors@rust-lang.org>2020-02-05 19:11:04 +0000
commit58b834344fc7b9185e7a50db1ff24e5eb07dae5e (patch)
tree0540b3dabbb0a85c859b0e64b3ae869f5b51a607 /src/libstd/sys/unix/stack_overflow.rs
parenteda1a7adfcf6de70afa4ca0a6f709ed0e507516a (diff)
parent1fad337f79a6a554ae947def38ec2db0e91d864c (diff)
downloadrust-58b834344fc7b9185e7a50db1ff24e5eb07dae5e.tar.gz
rust-58b834344fc7b9185e7a50db1ff24e5eb07dae5e.zip
Auto merge of #67429 - mati865:mingw-ultimate-fix, r=alexcrichton
windows-gnu: prefer system crt libraries if they are available

The origin of the issue is the fact Rust ships mingw-w64 libraries but no headers and prefers own libraries over the system ones.
This leads to situation when headers aren't compatible with libraries (mingw-w64 doesn't provide any forward compatibility and AFAIK backwards compatibility is guaranteed only within major release series).

It's easier to understand how this PR works when looking at the linker invocation before and with this PR: https://www.diffchecker.com/GEuYFmzo
It adds system libraries path before Rust libraries so the linker will prefer them.
It has potential issue when system has files with the same names as Rust but that could be avoided by moving Rust shipped mingw-w64 libraries from `lib/rustlib/x86_64-pc-windows-gnu/lib` to say `lib/rustlib/x86_64-pc-windows-gnu/lib/mingw`. Then adding linker paths in this order: Rust libraries, system libraries, Rust shipped mingw-w64 libraries.

Fixes #47048
Fixes #49078
Fixes #53454
Fixes #60912
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions