diff --git a/Cargo.toml b/Cargo.toml index 0c1b71851..66e689e95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,4 +61,4 @@ versions = "6.1.0" # Use a patched version of cc-rs that respects the rustc wrapper # This should greatly speed up CI builds! [patch.crates-io] -cc = { git = "https://github.com/Be-ing/cc-rs.git", branch="dont_override_apple_deployment_target" } +cc = { git = "https://github.com/Be-ing/cc-rs.git", branch="apple_deployment_target_api" } diff --git a/crates/cxx-qt-build/src/lib.rs b/crates/cxx-qt-build/src/lib.rs index 633f9b1ff..08c26aa1e 100644 --- a/crates/cxx-qt-build/src/lib.rs +++ b/crates/cxx-qt-build/src/lib.rs @@ -536,7 +536,7 @@ impl CxxQtBuilder { // MinGW requires big-obj otherwise debug builds fail builder.flag_if_supported("-Wa,-mbig-obj"); // macOS - builder.flag_if_supported(&format!("-mmacosx-version-min={}", macos_deployment_target)); + builder.apple_deployment_target(&macos_deployment_target); // Enable Qt Gui in C++ if the feature is enabled #[cfg(feature = "qt_gui")] builder.define("CXX_QT_GUI_FEATURE", None); diff --git a/crates/cxx-qt-lib/build.rs b/crates/cxx-qt-lib/build.rs index 357a5143c..098006770 100644 --- a/crates/cxx-qt-lib/build.rs +++ b/crates/cxx-qt-lib/build.rs @@ -319,7 +319,7 @@ fn main() { // GCC + Clang builder.flag_if_supported("-std=c++17"); // macOS - builder.flag_if_supported(&format!("-mmacosx-version-min={}", macos_deployment_target)); + builder.apple_deployment_target(&macos_deployment_target); builder.file(&format!("{}/src/broken.cpp", env!("CARGO_MANIFEST_DIR"))); // MinGW requires big-obj otherwise debug builds fail builder.flag_if_supported("-Wa,-mbig-obj");