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 6c87d7c commit 2b10b4bCopy full SHA for 2b10b4b
build.rs
@@ -28,6 +28,13 @@ const ALLOWED_CFGS: &[&str] = &[
28
"libc_union",
29
];
30
31
+// Extra values to allow for check-cfg.
32
+const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[
33
+ ("target_os", &["switch"]),
34
+ ("target_env", &["illumos", "wasi"]),
35
+ ("target_arch", &["loongarch64"]),
36
+];
37
+
38
fn main() {
39
// Avoid unnecessary re-building.
40
println!("cargo:rerun-if-changed=build.rs");
@@ -148,6 +155,10 @@ fn main() {
148
155
for cfg in ALLOWED_CFGS {
149
156
println!("cargo:rustc-check-cfg=values({})", cfg);
150
157
}
158
+ for (name, values) in CHECK_CFG_EXTRA {
159
+ let values = values.join("\",\"");
160
+ println!("cargo:rustc-check-cfg=values({},\"{}\")", name, values);
161
+ }
151
162
152
163
153
164
0 commit comments