diff --git a/.github/workflows/nightly_posix.yml b/.github/workflows/nightly_posix.yml index 7ac0c1c26..bc056d3e7 100644 --- a/.github/workflows/nightly_posix.yml +++ b/.github/workflows/nightly_posix.yml @@ -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: diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index ce802334a..5d207069c 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -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 diff --git a/.github/workflows/tag_posix.yml b/.github/workflows/tag_posix.yml index 0458b9616..a1d6017c6 100644 --- a/.github/workflows/tag_posix.yml +++ b/.github/workflows/tag_posix.yml @@ -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: diff --git a/deps/freetype/build.rs b/deps/freetype/build.rs index 3558facb0..b0bc49bda 100644 --- a/deps/freetype/build.rs +++ b/deps/freetype/build.rs @@ -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"); } diff --git a/deps/harfbuzz/build.rs b/deps/harfbuzz/build.rs index c55f971c1..07cda3053 100644 --- a/deps/harfbuzz/build.rs +++ b/deps/harfbuzz/build.rs @@ -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"); }