Skip to content

Commit

Permalink
Use updated cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed May 24, 2024
1 parent 3ffe600 commit e3d7095
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ libc = { version = "0.2.43", optional = true }

[build-dependencies]
pkg-config = "0.3.9"
cc = "1.0.97"
cc = "1.0.98"
cmake = { version = "0.1.50", optional = true }
vcpkg = "0.2"

Expand Down
11 changes: 0 additions & 11 deletions zng/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,7 @@ struct Build {

impl Build {
fn new(cfg: cc::Build) -> Self {
// cc currently has a bug where they create a named temp file in a directory
// without ensuring the directory exists first, so apply this workaround
// until it can be fixed upstream
// Can be removed once https://github.com/rust-lang/cc-rs/pull/1072 is merged and released.
let mut pb = PathBuf::from(env::var_os("OUT_DIR").expect("this should always be set"));
pb.push("lib");
if let Err(err) = std::fs::create_dir_all(&pb) {
panic!("failed to create {:?}: {}", pb, err);
}

let is_msvc = cfg.try_get_compiler().unwrap().is_like_msvc();

Self { cfg, is_msvc }
}

Expand Down

0 comments on commit e3d7095

Please sign in to comment.