diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-08-01 00:32:56 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-07-31 22:00:08 -0500 |
| commit | 24c770ba1c53c4c04acdba945cd9f59d687f4d5b (patch) | |
| tree | 6bb172f2a79d5433e750524bddd1a5c1e8fee134 /tests | |
| parent | adcb3d3b4cd3b7c4cde642f3ed537037f293738e (diff) | |
| download | rust-24c770ba1c53c4c04acdba945cd9f59d687f4d5b.tar.gz rust-24c770ba1c53c4c04acdba945cd9f59d687f4d5b.zip | |
aarch64: Make `outline-atomics` a known target feature
This is a feature used by LLVM that is enabled for our `aarch64-linux` targets, which we would like to configure on in `std`. Thus, mark `outline-atomics` a known feature. It is left unstable for now.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/assembly-llvm/asm/aarch64-outline-atomics.rs | 4 | ||||
| -rw-r--r-- | tests/ui/check-cfg/target_feature.stderr | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/assembly-llvm/asm/aarch64-outline-atomics.rs b/tests/assembly-llvm/asm/aarch64-outline-atomics.rs index 22599c18dcf..1177c1e68ed 100644 --- a/tests/assembly-llvm/asm/aarch64-outline-atomics.rs +++ b/tests/assembly-llvm/asm/aarch64-outline-atomics.rs @@ -8,6 +8,10 @@ use std::sync::atomic::AtomicI32; use std::sync::atomic::Ordering::*; +// Verify config on outline-atomics works (it is always enabled on aarch64-linux). +#[cfg(not(target_feature = "outline-atomics"))] +compile_error!("outline-atomics is not enabled"); + pub fn compare_exchange(a: &AtomicI32) { // On AArch64 LLVM should outline atomic operations. // CHECK: __aarch64_cas4_relax diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr index f422919983b..e730492fd9b 100644 --- a/tests/ui/check-cfg/target_feature.stderr +++ b/tests/ui/check-cfg/target_feature.stderr @@ -183,6 +183,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE"); `nnp-assist` `nontrapping-fptoint` `nvic` +`outline-atomics` `paca` `pacg` `pan` |
