Link dynamic and static late_link_args before generic ones
This commit is contained in:
parent
e599b53e67
commit
bfdb7903c9
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