Pass +atomics-32 feature for thumbv6m target
https://reviews.llvm.org/D120026 changed atomics on thumbv6m to use libatomic, to ensure that atomic load/store are compatible with atomic RMW/CAS. However, Rust wants to expose only load/store without libcalls. https://reviews.llvm.org/D130480 added support for this behind the +atomics-32 target feature, so enable that feature.
This commit is contained in:
parent
9d97606193
commit
89582e8193
2 changed files with 5 additions and 1 deletions
|
@ -440,6 +440,8 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
|
|||
.features
|
||||
.split(',')
|
||||
.filter(|v| !v.is_empty() && backend_feature_name(v).is_some())
|
||||
// Drop +atomics-32 feature introduced in LLVM 15.
|
||||
.filter(|v| *v != "+atomics-32" || get_version() >= (15, 0, 0))
|
||||
.map(String::from),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue