Also sort crt-static
in --print target-features
output
I didn't find `crt-static` at first (for `x86_64-unknown-linux-gnu`), because it was put at the bottom the large and otherwise sorted list. Fully sort the list before we print it. Note that `llvm_target_features` starts out sorted and does not need to be sorted an extra time.
This commit is contained in:
parent
7ac6c2fc68
commit
04af37170c
1 changed files with 5 additions and 0 deletions
|
@ -394,10 +394,15 @@ fn print_target_features(out: &mut dyn PrintBackendInfo, sess: &Session, tm: &ll
|
||||||
(*feature, desc)
|
(*feature, desc)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
// Since we add this at the end ...
|
||||||
rustc_target_features.extend_from_slice(&[(
|
rustc_target_features.extend_from_slice(&[(
|
||||||
"crt-static",
|
"crt-static",
|
||||||
"Enables C Run-time Libraries to be statically linked",
|
"Enables C Run-time Libraries to be statically linked",
|
||||||
)]);
|
)]);
|
||||||
|
// ... we need to sort the list again.
|
||||||
|
rustc_target_features.sort();
|
||||||
|
|
||||||
llvm_target_features.retain(|(f, _d)| !known_llvm_target_features.contains(f));
|
llvm_target_features.retain(|(f, _d)| !known_llvm_target_features.contains(f));
|
||||||
|
|
||||||
let max_feature_len = llvm_target_features
|
let max_feature_len = llvm_target_features
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue