mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-01 19:15:46 +00:00
d5f5648b37
We use cargo vendor to generate a .cargo/config file and the vendor directory. Vendoring allows us to lock our dependencies and to modify them easily from the top level Cargo.toml. We vendor all dependencies, including the crates.io ones, which allows for network isolated builds. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
23 lines
672 B
Rust
23 lines
672 B
Rust
extern crate autocfg;
|
|
|
|
fn main() {
|
|
// Normally, cargo will set `OUT_DIR` for build scripts.
|
|
let ac = autocfg::AutoCfg::with_dir("target").unwrap();
|
|
|
|
// since ancient times...
|
|
ac.emit_has_path("std::vec::Vec");
|
|
ac.emit_path_cfg("std::vec::Vec", "has_vec");
|
|
|
|
// rustc 1.10.0
|
|
ac.emit_has_path("std::panic::PanicInfo");
|
|
ac.emit_path_cfg("std::panic::PanicInfo", "has_panic_info");
|
|
|
|
// rustc 1.20.0
|
|
ac.emit_has_path("std::mem::ManuallyDrop");
|
|
ac.emit_path_cfg("std::mem::ManuallyDrop", "has_manually_drop");
|
|
|
|
// rustc 1.25.0
|
|
ac.emit_has_path("std::ptr::NonNull");
|
|
ac.emit_path_cfg("std::ptr::NonNull", "has_non_null");
|
|
}
|