Bump minimum macOS version to 10.15.7

This solves an issue with loading Swift libraries when running the
x86_64 binary.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-10-20 16:55:39 +02:00
parent 629d3d473c
commit de24b4b4e8
5 changed files with 12 additions and 13 deletions

View file

@ -57,7 +57,7 @@ fn compile_metal_shaders() {
"macosx", "macosx",
"metal", "metal",
"-gline-tables-only", "-gline-tables-only",
"-mmacosx-version-min=10.14", "-mmacosx-version-min=10.15.7",
"-MO", "-MO",
"-c", "-c",
shader_path, shader_path,

View file

@ -32,7 +32,7 @@ pub struct SwiftTarget {
pub paths: SwiftPaths, pub paths: SwiftPaths,
} }
const MACOS_TARGET_VERSION: &str = "10.15"; const MACOS_TARGET_VERSION: &str = "10.15.7";
fn main() { fn main() {
if cfg!(not(any(test, feature = "test-support"))) { if cfg!(not(any(test, feature = "test-support"))) {
@ -81,13 +81,9 @@ fn build_bridge(swift_target: &SwiftTarget) {
} }
fn link_swift_stdlib(swift_target: &SwiftTarget) { fn link_swift_stdlib(swift_target: &SwiftTarget) {
swift_target for path in &swift_target.paths.runtime_library_paths {
.paths println!("cargo:rustc-link-search=native={}", path);
.runtime_library_paths }
.iter()
.for_each(|path| {
println!("cargo:rustc-link-search=native={}", path);
});
} }
fn link_webrtc_framework(swift_target: &SwiftTarget) { fn link_webrtc_framework(swift_target: &SwiftTarget) {

View file

@ -127,4 +127,4 @@ unindent = "0.1.7"
icon = ["app-icon@2x.png", "app-icon.png"] icon = ["app-icon@2x.png", "app-icon.png"]
identifier = "dev.zed.Zed" identifier = "dev.zed.Zed"
name = "Zed" name = "Zed"
osx_minimum_system_version = "10.14" osx_minimum_system_version = "10.15.7"

View file

@ -1,7 +1,7 @@
use std::process::Command; use std::process::Command;
fn main() { fn main() {
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.14"); println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
if let Ok(api_key) = std::env::var("ZED_AMPLITUDE_API_KEY") { if let Ok(api_key) = std::env::var("ZED_AMPLITUDE_API_KEY") {
println!("cargo:rustc-env=ZED_AMPLITUDE_API_KEY={api_key}"); println!("cargo:rustc-env=ZED_AMPLITUDE_API_KEY={api_key}");

View file

@ -3,7 +3,7 @@
set -e set -e
export ZED_BUNDLE=true export ZED_BUNDLE=true
export MACOSX_DEPLOYMENT_TARGET=10.14 export MACOSX_DEPLOYMENT_TARGET=10.15.7
echo "Installing cargo bundle" echo "Installing cargo bundle"
cargo install cargo-bundle --version 0.5.0 cargo install cargo-bundle --version 0.5.0
@ -12,10 +12,13 @@ rustup target add wasm32-wasi
# Deal with versions of macOS that don't include libstdc++ headers # Deal with versions of macOS that don't include libstdc++ headers
export CXXFLAGS="-stdlib=libc++" export CXXFLAGS="-stdlib=libc++"
echo "Compiling binaries" echo "Compiling zed binary for aarch64-apple-darwin"
cargo build --release --package zed --target aarch64-apple-darwin cargo build --release --package zed --target aarch64-apple-darwin
echo "Compiling zed binary for x86_64-apple-darwin"
cargo build --release --package zed --target x86_64-apple-darwin cargo build --release --package zed --target x86_64-apple-darwin
echo "Compiling cli binary for aarch64-apple-darwin"
cargo build --release --package cli --target aarch64-apple-darwin cargo build --release --package cli --target aarch64-apple-darwin
echo "Compiling cli binary for x86_64-apple-darwin"
cargo build --release --package cli --target x86_64-apple-darwin cargo build --release --package cli --target x86_64-apple-darwin
echo "Creating application bundle" echo "Creating application bundle"