Add aliases for complex feature flag combinations (#4479)
This commit is contained in:
parent
e13c277f9d
commit
85c30e8eeb
2 changed files with 32 additions and 0 deletions
16
core/build.rs
Normal file
16
core/build.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
fn main() {
|
||||||
|
if cfg!(target_arch = "wasm32") {
|
||||||
|
println!("cargo:rustc-cfg=wasm");
|
||||||
|
println!("cargo::rustc-check-cfg=cfg(wasm)");
|
||||||
|
}
|
||||||
|
if cfg!(any(
|
||||||
|
feature = "kv-mem",
|
||||||
|
feature = "kv-fdb",
|
||||||
|
feature = "kv-tikv",
|
||||||
|
feature = "kv-rocksdb",
|
||||||
|
feature = "kv-surrealkv",
|
||||||
|
)) {
|
||||||
|
println!("cargo:rustc-cfg=storage");
|
||||||
|
println!("cargo::rustc-check-cfg=cfg(storage)");
|
||||||
|
}
|
||||||
|
}
|
16
lib/build.rs
Normal file
16
lib/build.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
fn main() {
|
||||||
|
if cfg!(target_arch = "wasm32") {
|
||||||
|
println!("cargo:rustc-cfg=wasm");
|
||||||
|
println!("cargo::rustc-check-cfg=cfg(wasm)");
|
||||||
|
}
|
||||||
|
if cfg!(any(
|
||||||
|
feature = "kv-mem",
|
||||||
|
feature = "kv-fdb",
|
||||||
|
feature = "kv-tikv",
|
||||||
|
feature = "kv-rocksdb",
|
||||||
|
feature = "kv-surrealkv",
|
||||||
|
)) {
|
||||||
|
println!("cargo:rustc-cfg=storage");
|
||||||
|
println!("cargo::rustc-check-cfg=cfg(storage)");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue