rust/src/librustc_codegen_ssa
bors 58b834344f 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
2020-02-05 19:11:04 +00:00
..
back Auto merge of #67429 - mati865:mingw-ultimate-fix, r=alexcrichton 2020-02-05 19:11:04 +00:00
debuginfo Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
mir rustc_codegen_ssa: convert mir::VarDebugInfo into a custom PerLocalVarDebugInfo. 2020-02-03 12:14:22 +02:00
traits rustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr. 2020-02-03 12:14:21 +02:00
base.rs Move builtin attribute logic to new rustc_attr crate. 2020-02-01 18:54:56 +01:00
Cargo.toml Move builtin attribute logic to new rustc_attr crate. 2020-02-01 18:54:56 +01:00
common.rs remove rustc_error_codes deps except in rustc_driver 2020-01-18 21:53:53 +01:00
glue.rs Format the world 2019-12-22 17:42:47 -05:00
lib.rs Drop cfg(bootstrap) code 2020-01-31 12:31:09 -05:00
meth.rs Format the world 2019-12-22 17:42:47 -05:00
mono_item.rs Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
README.md remove the last remaining READMEs 2019-10-24 13:32:54 -05:00

Please read the rustc-guide chapter on Backend Agnostic Codegen.