about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-02 21:22:47 +0100
committerGitHub <noreply@github.com>2022-12-02 21:22:47 +0100
commitdab14348e981a9e660cf8c8d13f7547dbf04c1eb (patch)
tree9798461423ec7876d6b5f017ab6a00be09c77a27 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parente960b5e7749e95c6a6b2fdec7250a48105664efb (diff)
parent382dba52ee0c6142d9a3774d735962797c043fab (diff)
downloadrust-dab14348e981a9e660cf8c8d13f7547dbf04c1eb.tar.gz
rust-dab14348e981a9e660cf8c8d13f7547dbf04c1eb.zip
Rollup merge of #105026 - oToToT:aarch64-v8a, r=davidtwco
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.

p.s. a bit more context can also be found in https://github.com/llvm/llvm-project/issues/57904#issuecomment-1329555590.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs5
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 c9f5dd0f2c6..2fa602520dc 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -494,6 +494,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,