We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1def24c commit e0a8f22Copy full SHA for e0a8f22
compiler/rustc_target/src/spec/tests/tests_impl.rs
@@ -36,5 +36,18 @@ impl Target {
36
&& self.post_link_objects_fallback.is_empty())
37
|| self.crt_objects_fallback.is_some()
38
);
39
+ // Keep the default "unknown" vendor instead.
40
+ assert_ne!(self.vendor, "");
41
+ if !self.can_use_os_unknown() {
42
+ // Keep the default "none" for bare metal targets instead.
43
+ assert_ne!(self.os, "unknown");
44
+ }
45
46
+
47
+ // Add your target to the whitelist if it has `std` library
48
+ // and you certainly want "unknown" for the OS name.
49
+ fn can_use_os_unknown(&self) -> bool {
50
+ self.llvm_target == "wasm32-unknown-unknown"
51
+ || (self.env == "sgx" && self.vendor == "fortanix")
52
}
53
0 commit comments