Skip to content

Commit 6835f7c

Browse files
authored
Remove workaround for broken cc-rs versions (#235)
The workaround introduced in #39 is no longer necessary since `cc-rs` handles C++ requirements internally, and is in fact detrimental since `cc-rs` has required the target to be a `rustc` target triple since rust-lang/cc-rs#1225 / rust-lang/cc-rs#1252. Additionally, deprecate `uses_cxx11` which was introduced in the same PR. Fixes rust-lang/cc-rs#1276. I didn't update the dependency to anything specific, just a version that I know has the fix.
1 parent 0542060 commit 6835f7c

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ categories = ["development-tools::build-utils"]
1515
edition = "2021"
1616

1717
[dependencies]
18-
cc = "1.0.83"
18+
cc = "1.1.0"

src/lib.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ impl Config {
387387
///
388388
/// This does not otherwise affect any CXX flags, i.e. it does not set
389389
/// -std=c++11 or -stdlib=libc++.
390+
#[deprecated = "no longer does anything, C++ is determined based on `cc::Build`, and the macOS issue has been fixed upstream"]
390391
pub fn uses_cxx11(&mut self) -> &mut Config {
391392
self.uses_cxx11 = true;
392393
self
@@ -440,13 +441,7 @@ impl Config {
440441
pub fn build(&mut self) -> PathBuf {
441442
let target = match self.target.clone() {
442443
Some(t) => t,
443-
None => {
444-
let mut t = getenv_unwrap("TARGET");
445-
if t.ends_with("-darwin") && self.uses_cxx11 {
446-
t += "11"
447-
}
448-
t
449-
}
444+
None => getenv_unwrap("TARGET"),
450445
};
451446
let host = self.host.clone().unwrap_or_else(|| getenv_unwrap("HOST"));
452447

0 commit comments

Comments
 (0)