mirror of
https://gitee.com/openharmony/third_party_rust_serde
synced 2024-11-23 15:01:05 +00:00
13 lines
440 B
Rust
13 lines
440 B
Rust
use std::path::Path;
|
|
|
|
fn main() {
|
|
// Sometimes on Windows the git checkout does not correctly wire up the
|
|
// symlink from serde_derive_internals/src to serde_derive/src/internals.
|
|
// When this happens we'll just build based on relative paths within the git
|
|
// repo.
|
|
let mod_behind_symlink = Path::new("src/mod.rs");
|
|
if !mod_behind_symlink.exists() {
|
|
println!("cargo:rustc-cfg=serde_build_from_git");
|
|
}
|
|
}
|