Skip to content

Commit

Permalink
Merge pull request #33 from Brooooooklyn/patch-1
Browse files Browse the repository at this point in the history
CARGO_CFG_TARGET_FEATURE may not exist
  • Loading branch information
NoXF authored Sep 24, 2024
2 parents 9bb03fc + 9584c31 commit 838e78a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn setup_build(build: &mut cc::Build, include_dir: &PathBuf) {
}

let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH");
let target_features = env::var("CARGO_CFG_TARGET_FEATURE").expect("CARGO_CFG_TARGET_FEATURE");
let target_features = env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or_default();
let has_feature = |f: &str| target_features.split(',').any(|feature| feature == f);

let target_cpu = env::var("TARGET_CPU").ok();
Expand Down

0 comments on commit 838e78a

Please sign in to comment.