Auto merge of #132800 - matthiaskrgr:rollup-c1kkj56, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #132552 (Add v9, v8plus, and leoncasa target feature to sparc and use v8plus in create_object_file) - #132745 (pointee_info_at: fix logic for recursing into enums) - #132777 (try_question_mark_nop: update test for LLVM 20) - #132785 (rustc_target: more target string fixes for LLVM 20) - #132794 (Use a separate dir for r-a builds consistently in helix config) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
80445576d0
26 changed files with 203 additions and 31 deletions
|
@ -228,6 +228,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
|
|||
"x86"
|
||||
} else if sess.target.arch == "arm64ec" {
|
||||
"aarch64"
|
||||
} else if sess.target.arch == "sparc64" {
|
||||
"sparc"
|
||||
} else {
|
||||
&*sess.target.arch
|
||||
};
|
||||
|
@ -280,6 +282,13 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
|
|||
// Support for `wide-arithmetic` will first land in LLVM 20 as part of
|
||||
// llvm/llvm-project#111598
|
||||
("wasm32" | "wasm64", "wide-arithmetic") if get_version() < (20, 0, 0) => None,
|
||||
("sparc", "leoncasa") => Some(LLVMFeature::new("hasleoncasa")),
|
||||
// In LLVM 19, there is no `v8plus` feature and `v9` means "SPARC-V9 instruction available and SPARC-V8+ ABI used".
|
||||
// https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L27-L28
|
||||
// Before LLVM 19, there is no `v8plus` feature and `v9` means "SPARC-V9 instruction available".
|
||||
// https://github.com/llvm/llvm-project/blob/llvmorg-18.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L26
|
||||
("sparc", "v8plus") if get_version().0 == 19 => Some(LLVMFeature::new("v9")),
|
||||
("sparc", "v8plus") if get_version().0 < 19 => None,
|
||||
(_, s) => Some(LLVMFeature::new(s)),
|
||||
}
|
||||
}
|
||||
|
@ -619,6 +628,8 @@ pub(crate) fn global_llvm_features(
|
|||
.features
|
||||
.split(',')
|
||||
.filter(|v| !v.is_empty() && backend_feature_name(sess, v).is_some())
|
||||
// Drop +v8plus feature introduced in LLVM 20.
|
||||
.filter(|v| *v != "+v8plus" || get_version() >= (20, 0, 0))
|
||||
.map(String::from),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue