From 2f7cc33d54a17bd86bdd08e43c0f7e6fcd2d2e9e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 7 Feb 2025 22:53:45 +0100 Subject: [PATCH 1/2] Remove workaround for broken cc-rs versions I didn't update the dependency to anything specific, just a version that I know has the fix. --- Cargo.toml | 2 +- src/lib.rs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c6f9e20..8a106b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ categories = ["development-tools::build-utils"] edition = "2021" [dependencies] -cc = "1.0.83" +cc = "1.1.0" diff --git a/src/lib.rs b/src/lib.rs index 9054673..80ab7e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -440,13 +440,7 @@ impl Config { pub fn build(&mut self) -> PathBuf { let target = match self.target.clone() { Some(t) => t, - None => { - let mut t = getenv_unwrap("TARGET"); - if t.ends_with("-darwin") && self.uses_cxx11 { - t += "11" - } - t - } + None => getenv_unwrap("TARGET"), }; let host = self.host.clone().unwrap_or_else(|| getenv_unwrap("HOST")); From 83d887588391ffc6839f6a6d98d848b12a8941a1 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Feb 2025 15:33:40 +0100 Subject: [PATCH 2/2] Deprecate `uses_cxx11` --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 80ab7e7..57d4a43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -387,6 +387,7 @@ impl Config { /// /// This does not otherwise affect any CXX flags, i.e. it does not set /// -std=c++11 or -stdlib=libc++. + #[deprecated = "no longer does anything, C++ is determined based on `cc::Build`, and the macOS issue has been fixed upstream"] pub fn uses_cxx11(&mut self) -> &mut Config { self.uses_cxx11 = true; self