Skip to content

Commit

Permalink
Do not emit unnecessary "cargo:rustc-env=" instructions. (#184)
Browse files Browse the repository at this point in the history
"cargo:rustc-env=TYPENUM_BUILD_OP=..." and "cargo:rustc-env=TYPENUM_BUILD_CONSTS=..." trigger unnecessary rebuilds when using the "force_unix_path_separator" feature.
  • Loading branch information
dnbln committed Dec 5, 2022
1 parent cb3d2d5 commit d3b30c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/main.rs
Expand Up @@ -90,6 +90,7 @@ fn main() {

let out_dir = env::var("OUT_DIR").unwrap();
let dest = Path::new(&out_dir).join("consts.rs");
#[cfg(not(feature = "force_unix_path_separator"))]
println!("cargo:rustc-env=TYPENUM_BUILD_CONSTS={}", dest.display());

let mut f = File::create(&dest).unwrap();
Expand Down
1 change: 1 addition & 0 deletions build/op.rs
Expand Up @@ -18,6 +18,7 @@ struct Op {
pub fn write_op_macro() -> ::std::io::Result<()> {
let out_dir = ::std::env::var("OUT_DIR").unwrap();
let dest = ::std::path::Path::new(&out_dir).join("op.rs");
#[cfg(not(feature = "force_unix_path_separator"))]
println!("cargo:rustc-env=TYPENUM_BUILD_OP={}", dest.display());
let mut f = ::std::fs::File::create(&dest).unwrap();

Expand Down

0 comments on commit d3b30c8

Please sign in to comment.