diff options
| author | Tommy Chiang (oToToT) <ty1208chiang@gmail.com> | 2022-11-29 02:48:33 +0800 |
|---|---|---|
| committer | Tommy Chiang (oToToT) <ty1208chiang@gmail.com> | 2022-11-29 14:25:46 +0800 |
| commit | 382dba52ee0c6142d9a3774d735962797c043fab (patch) | |
| tree | d26e8a584557c22f0482902e8ed253bf2b76eb1e /compiler/rustc_codegen_llvm | |
| parent | 8a09420ac48658cad726e0a6997687ceac4151e3 (diff) | |
| download | rust-382dba52ee0c6142d9a3774d735962797c043fab.tar.gz rust-382dba52ee0c6142d9a3774d735962797c043fab.zip | |
v8a as default aarch64 target
After https://github.com/llvm/llvm-project/commit/8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list. This should solve #97724.
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index bc3a94a4027..dac19b8656d 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -491,6 +491,11 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str .flatten(); features.extend(feats); + // FIXME: Move v8a to target definition list when earliest supported LLVM is 14. + if get_version() >= (14, 0, 0) && sess.target.arch == "aarch64" { + features.push("+v8a".into()); + } + if diagnostics && let Some(f) = check_tied_features(sess, &featsmap) { sess.emit_err(TargetFeatureDisableOrEnable { features: f, |
