forked from ss220-space/dmjit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
21 lines (17 loc) · 674 Bytes
/
build.rs
File metadata and controls
21 lines (17 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use anyhow::Result;
use vergen::{Config, TimeZone, vergen};
fn main() -> Result<()> {
// Generate the default 'cargo:' instruction output
let mut config = Config::default();
*config.build_mut().timezone_mut() = TimeZone::Local;
println!("cargo:rerun-if-changed=src");
if std::env::var("OUT_DIR").unwrap().contains("release-dist") {
println!("cargo:rustc-cfg=rotate_logs");
println!("cargo:rustc-env=DMJIT_LOG_PREFIX=data/logs/");
} else {
println!("cargo:rustc-cfg=debug_deopt_print");
println!("cargo:rustc-env=DMJIT_LOG_PREFIX=");
}
//println!("cargo:rustc-cfg=debug_on_call_print");
vergen(config)
}