Skip to content

Commit

Permalink
build: Emit rustc-check-cfg for known modules and develhelp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Aug 21, 2024
1 parent 4912069 commit 9095f8b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,48 @@ fn main() {
println!("cargo:rustc-cfg=marker_{}", def.to_lowercase());
}
}

println!("cargo::rustc-check-cfg=cfg(riot_develhelp)");

// FIXME: This list is currently maintained manually;
let known_modules = &[
"auto_init",
"auto_init_random",
"bluetil_ad",
"core_msg",
"gcoap",
"gnrc",
"gnrc_icmpv6",
"gnrc_pktbuf",
"gnrc_udp",
"ipv6",
"microbit",
"nimble_host",
"periph_adc",
"periph_dac",
"periph_gpio",
"periph_i2c",
"periph_spi",
"prng_shaxprng",
"pthread",
"random",
"saul",
"shell",
"sock",
"sock_aux_local",
"sock_tcp",
"sock_udp",
"udp",
"vfs",
"ws281x",
"ztimer",
"ztimer_msec",
"ztimer_periodic",
"ztimer_sec",
"ztimer_usec",
];

for module in known_modules {
println!("cargo::rustc-check-cfg=cfg(riot_module_{})", module);
}
}

0 comments on commit 9095f8b

Please sign in to comment.