Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workaround for broken cc-rs versions #235

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ categories = ["development-tools::build-utils"]
edition = "2021"

[dependencies]
cc = "1.0.83"
cc = "1.1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't update this to anything specific, just a version that I know has the fix. I guess if you wanted, I could do a bit more research and find the precise version that fixes it.

9 changes: 2 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -440,13 +441,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"));

Expand Down