about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-12-09 00:48:09 -0800
committerGitHub <noreply@github.com>2023-12-09 00:48:09 -0800
commit85c9de97994b585a193345cc462b5562d13306e4 (patch)
tree68bdbd71da9dfb39dd93e3b90eb94558a7f167d1 /compiler/rustc_codegen_llvm/src
parent8f9d8277dec3bdf71eec899478eb0012054c6154 (diff)
parentb378059e6b2573c5356423fa31d184a89a3b6029 (diff)
downloadrust-85c9de97994b585a193345cc462b5562d13306e4.tar.gz
rust-85c9de97994b585a193345cc462b5562d13306e4.zip
Rollup merge of #118610 - krasimirgg:llvm-18-dec, r=nikic
update target feature following LLVM API change

LLVM commit https://github.com/llvm/llvm-project/commit/e81796671890b59c110f8e41adc7ca26f8484d20 renamed* the `unaligned-scalar-mem` target feature to `fast-unaligned-access`.

(*) technically the commit folded two previous features into one, but there are no references to the other one in rust.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index eb69efb0d59..93cb7327a01 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -263,6 +263,10 @@ pub fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> LLVMFeature<'a> {
             "sve2-bitperm",
             TargetFeatureFoldStrength::EnableOnly("neon"),
         ),
+        // The unaligned-scalar-mem feature was renamed to fast-unaligned-access.
+        ("riscv32" | "riscv64", "fast-unaligned-access") if get_version().0 <= 17 => {
+            LLVMFeature::new("unaligned-scalar-mem")
+        }
         (_, s) => LLVMFeature::new(s),
     }
 }