From 3ba87498fa3349d63f622593ea7d722105059978 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 16 Oct 2024 18:56:43 -0700 Subject: [PATCH] Fix rustc_target test: wasmNN-none should support dynamic linking --- compiler/rustc_target/src/spec/tests/tests_impl.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs index 7ed21954fba..cc5931be860 100644 --- a/compiler/rustc_target/src/spec/tests/tests_impl.rs +++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs @@ -121,7 +121,13 @@ fn check_consistency(&self) { // Check dynamic linking stuff // BPF: when targeting user space vms (like rbpf), those can load dynamic libraries. // hexagon: when targeting QuRT, that OS can load dynamic libraries. - if self.os == "none" && (self.arch != "bpf" && self.arch != "hexagon") { + // wasm{32,64}: dynamic linking is inherent in the definition of the VM. + if self.os == "none" + && (self.arch != "bpf" + && self.arch != "hexagon" + && self.arch != "wasm32" + && self.arch != "wasm64") + { assert!(!self.dynamic_linking); } if self.only_cdylib