Rollup merge of #77208 - mati865:late-link-args-order, r=petrochenkov
Late link args order MSYS2 changed how winpthreads is built and as the result it now depends on more mingw-w64 libraries. This PR affects only MinGW targets since nobody else is using `late_link_args_{dynamic,static}`. Now the order is similar to how it used to be before https://github.com/rust-lang/rust/pull/67502.
This commit is contained in:
commit
3d1d24da94
2 changed files with 4 additions and 9 deletions
|
@ -1333,9 +1333,6 @@ fn add_late_link_args(
|
|||
crate_type: CrateType,
|
||||
codegen_results: &CodegenResults,
|
||||
) {
|
||||
if let Some(args) = sess.target.target.options.late_link_args.get(&flavor) {
|
||||
cmd.args(args);
|
||||
}
|
||||
let any_dynamic_crate = crate_type == CrateType::Dylib
|
||||
|| codegen_results.crate_info.dependency_formats.iter().any(|(ty, list)| {
|
||||
*ty == crate_type && list.iter().any(|&linkage| linkage == Linkage::Dynamic)
|
||||
|
@ -1349,6 +1346,9 @@ fn add_late_link_args(
|
|||
cmd.args(args);
|
||||
}
|
||||
}
|
||||
if let Some(args) = sess.target.target.options.late_link_args.get(&flavor) {
|
||||
cmd.args(args);
|
||||
}
|
||||
}
|
||||
|
||||
/// Add arbitrary "post-link" args defined by the target spec.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue