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

cxx-qt-build: set minimum macOS version #825

Closed
wants to merge 1 commit into from
Closed
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 @@ -60,4 +60,4 @@ serde_json = "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/LeonMatthesKDAB/cc-rs.git", branch="respect-rustc-wrapper" }
cc = { git = "https://github.com/Be-ing/cc-rs.git", branch="apple_deployment_target_api" }
5 changes: 5 additions & 0 deletions crates/cxx-qt-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ impl CxxQtBuilder {
builder.flag_if_supported("-std=c++17");
// MinGW requires big-obj otherwise debug builds fail
builder.flag_if_supported("-Wa,-mbig-obj");
// macOS
// We need
// - std::filesystem::path from 10.15
// - std::shared_mutex from 10.12
builder.apple_deployment_target(&"10.5");
Copy link
Collaborator

Choose a reason for hiding this comment

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

does the upstream change mean we still need this ? rust-lang/cc-rs#943 Sounds like it reads the SDK's DefaultDeploymentTarget again ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah let's close this

// Enable Qt Gui in C++ if the feature is enabled
#[cfg(feature = "qt_gui")]
builder.define("CXX_QT_GUI_FEATURE", None);
Expand Down
5 changes: 5 additions & 0 deletions crates/cxx-qt-lib/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ fn main() {
builder.flag_if_supported("/bigobj");
// GCC + Clang
builder.flag_if_supported("-std=c++17");
// macOS
// We need
// - std::filesystem::path from 10.15
// - std::shared_mutex from 10.12
builder.apple_deployment_target(&"10.15");
// MinGW requires big-obj otherwise debug builds fail
builder.flag_if_supported("-Wa,-mbig-obj");

Expand Down
Loading