summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2020-12-30 12:52:21 -0600
committerGus Caplan <me@gus.host>2021-04-04 11:29:34 -0500
commitda66a31572e0f49981d6b958ecdd95397ecf2d3f (patch)
tree55b595fb8db8356d328dd83999db2dea646829cc /compiler/rustc_codegen_llvm/src/back
parent5d04957a4b4714f71d38326fc96a0b0ef6dc5800 (diff)
downloadrust-da66a31572e0f49981d6b958ecdd95397ecf2d3f.tar.gz
rust-da66a31572e0f49981d6b958ecdd95397ecf2d3f.zip
wasm64
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 388dd7ce81b..b354b97b2d5 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -170,10 +170,7 @@ pub fn target_machine_factory(
     // On the wasm target once the `atomics` feature is enabled that means that
     // we're no longer single-threaded, or otherwise we don't want LLVM to
     // lower atomic operations to single-threaded operations.
-    if singlethread
-        && sess.target.llvm_target.contains("wasm32")
-        && sess.target_features.contains(&sym::atomics)
-    {
+    if singlethread && sess.target.is_like_wasm && sess.target_features.contains(&sym::atomics) {
         singlethread = false;
     }