Skip to content

Commit 2971439

Browse files
committed
chore: 添加linux,windows,macos的cfg_alias
1 parent 0d9cdb8 commit 2971439

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

crates/project_graph/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ fn main() {
55
android: { target_os = "android" },
66
wasm: { target_arch = "wasm32" },
77
desktop: { all(not(target_os = "android"), not(target_arch = "wasm32")) },
8+
linux: { target_os = "linux" },
9+
windows: { target_os = "windows" },
10+
macos: { target_os = "macos" },
811
}
912

1013
println!("cargo::rustc-check-cfg=cfg(android)");
1114
println!("cargo::rustc-check-cfg=cfg(wasm)");
1215
println!("cargo::rustc-check-cfg=cfg(desktop)");
16+
println!("cargo::rustc-check-cfg=cfg(linux)");
17+
println!("cargo::rustc-check-cfg=cfg(windows)");
18+
println!("cargo::rustc-check-cfg=cfg(macos)");
1319
}

0 commit comments

Comments
 (0)