RDCT-1171: fix unix compilation

GitOrigin-RevId: 56228ecc1385a23857686e9fb16f8caa979099c6
This commit is contained in:
Ivan Pashchenko
2024-03-15 02:03:07 +00:00
committed by intellij-monorepo-bot
parent 027a59d5b8
commit 2e446a8b2d
+6 -3
View File
@@ -1,10 +1,11 @@
// technically we shouldn't use #cfg in build.rs due to cross-compilation,
// but the only we do is windows x64 -> arm64, so it's fine for our purposes
use std::path::{PathBuf};
#[cfg(target_os = "windows")]
use winresource::WindowsResource;
// technically we shouldn't use #cfg here due to cross-compilation,
// but the only we do is windows x64 -> arm64, so it's fine for our purposes
fn main() {
println!("cargo:rerun-if-changed=build.rs");
main_os_specific()
@@ -24,6 +25,7 @@ fn main_os_specific() {
}
}
#[cfg(target_os = "windows")]
fn enable_symlinks_if_can_create_them() {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
let target = out_dir.join("target");
@@ -54,6 +56,7 @@ fn enable_symlinks_if_can_create_them() {
}
}
#[cfg(target_os = "windows")]
fn embed_metadata() {
let cargo_root_env_var = std::env::var("CARGO_MANIFEST_DIR").unwrap();