We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5cc131 commit 7cc6338Copy full SHA for 7cc6338
build.rs
@@ -29,6 +29,13 @@ const ALLOWED_CFGS: &[&str] = &[
29
"libc_union",
30
];
31
32
+// Extra values to allow for check-cfg.
33
+const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[
34
+ ("target_os", &["switch"]),
35
+ ("target_env", &["illumos", "wasi"]),
36
+ ("target_arch", &["loongarch64"]),
37
+];
38
+
39
fn main() {
40
// Avoid unnecessary re-building.
41
println!("cargo:rerun-if-changed=build.rs");
@@ -154,6 +161,10 @@ fn main() {
154
161
for cfg in ALLOWED_CFGS {
155
162
println!("cargo:rustc-check-cfg=values({})", cfg);
156
163
}
164
+ for (name, values) in CHECK_CFG_EXTRA {
165
+ let values = values.join("\",\"");
166
+ println!("cargo:rustc-check-cfg=values({},\"{}\")", name, values);
167
+ }
157
168
158
169
159
170
0 commit comments