Skip to content

Commit

Permalink
CARGO_CFG_TARGET_FEATURE may not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Sep 21, 2024
1 parent 9bb03fc commit 9584c31
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 9584c31

Please sign in to comment.