1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-12 21:30:45 +03:00

try to target older macos releases

refs: https://github.com/wez/wezterm/issues/128
This commit is contained in:
Wez Furlong 2020-01-26 16:14:00 -08:00
parent efad4b736d
commit bd179fa56c
5 changed files with 22 additions and 6 deletions

View File

@ -23,6 +23,9 @@ jobs:
toolchain: ${{ matrix.rust_toolchain }}
override: true
components: rustfmt
- name: Set macOS deployment target
run: |
echo "::set-env name=MACOSX_DEPLOYMENT_TARGET=10.9"
- name: Cache cargo registry
uses: actions/cache@v1
with:

View File

@ -27,6 +27,9 @@ jobs:
toolchain: ${{ matrix.rust_toolchain }}
override: true
components: rustfmt
- name: Set macOS deployment target
run: |
echo "::set-env name=MACOSX_DEPLOYMENT_TARGET=10.9"
- name: Show versions
run: |
rustc -V

View File

@ -23,6 +23,9 @@ jobs:
profile: minimal
toolchain: ${{ matrix.rust_toolchain }}
override: true
- name: Set macOS deployment target
run: |
echo "::set-env name=MACOSX_DEPLOYMENT_TARGET=10.9"
- name: Cache cargo registry
uses: actions/cache@v1
with:

View File

@ -2,6 +2,13 @@ use std::env;
use std::fs;
use std::path::{Path, PathBuf};
fn new_build() -> cc::Build {
let mut cfg = cc::Build::new();
cfg.warnings(false);
cfg.flag_if_supported("-fno-stack-check");
cfg
}
fn zlib() {
if !Path::new("zlib/.git").exists() {
git_submodule_update();
@ -9,8 +16,7 @@ fn zlib() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let mut cfg = cc::Build::new();
cfg.warnings(false);
let mut cfg = new_build();
let build_dir = out_dir.join("zlib-build");
fs::create_dir_all(&build_dir).unwrap();
cfg.out_dir(&build_dir);
@ -47,8 +53,7 @@ fn libpng() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let mut cfg = cc::Build::new();
cfg.warnings(false);
let mut cfg = new_build();
let build_dir = out_dir.join("png-build");
fs::create_dir_all(&build_dir).unwrap();
cfg.out_dir(&build_dir);
@ -96,8 +101,7 @@ fn freetype() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let mut cfg = cc::Build::new();
cfg.warnings(false);
let mut cfg = new_build();
let build_dir = out_dir.join("freetype-build");
fs::create_dir_all(&build_dir).unwrap();
cfg.out_dir(&build_dir);
@ -219,4 +223,5 @@ fn main() {
freetype();
let out_dir = env::var("OUT_DIR").unwrap();
println!("cargo:outdir={}", out_dir);
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.9");
}

View File

@ -17,6 +17,7 @@ fn harfbuzz() {
cfg.flag_if_supported("-fno-exceptions");
cfg.flag_if_supported("-fno-threadsafe-statics");
cfg.flag_if_supported("-std=c++11");
cfg.flag_if_supported("-fno-stack-check");
let build_dir = out_dir.join("harfbuzz-build");
fs::create_dir_all(&build_dir).unwrap();
@ -139,4 +140,5 @@ fn main() {
harfbuzz();
let out_dir = env::var("OUT_DIR").unwrap();
println!("cargo:outdir={}", out_dir);
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.9");
}