Set deployment targets to the static libraries built for Apple platforms #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When building libraries for Apple platforms, Rust sets minimal os versions to static libraries. The minimal os versions are set by special environment variables, and default ones are used if env var is not set. This PR sets deployment target environment variables when building for Apple platforms, to alight them with the ones defined in the
Package.swift
file.Please note: for some reason, even though we have set the macos deployment target to 10.15, the built static library still has a 11.0 minimal os version (see the script output below). That's why this PR also bumps supported macOS version. Please let me know if you have any concerns.
Tests
You can use this script to print some static libraries's supported platform and the minimal os version.
Please note: you'll need to run a clean build:
make clean xcframework
before running the script.Here is a comparison of the script outputs on my Mac