diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..3d7169bbc --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,8 @@ +# For macOS, support 10.9 on x86-64, and 11.0 on aarch64, which +# is the minimum supported version for Apple Silicon. +[target.x86_64-apple-darwin] +rustflags = ["-C", "link-arg=-mmacosx-version-min=10.9"] + +[target.aarch64-apple-darwin] +rustflags = ["-C", "link-arg=-mmacosx-version-min=11.0"] + diff --git a/build_tools/make_pkg.sh b/build_tools/make_pkg.sh index 5dc0272fc..f5159570c 100755 --- a/build_tools/make_pkg.sh +++ b/build_tools/make_pkg.sh @@ -67,28 +67,28 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in # and will probably not be built universal, so the package will fail to validate/run on other systems. # Note CMAKE_OSX_ARCHITECTURES is still relevant for the Mac app. { cd "$PKGDIR/build_arm64" \ - && cmake -DMAC_INJECT_GET_TASK_ALLOW=OFF \ + && cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \ -DWITH_GETTEXT=OFF \ -DRust_CARGO_TARGET=aarch64-apple-darwin \ - -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \ + -DCMAKE_OSX_ARCHITECTURES='arm64' \ -DFISH_USE_SYSTEM_PCRE2=OFF \ "$SRC_DIR" \ - && make VERBOSE=1 -j 12 \ - && env DESTDIR="$PKGDIR/root/" make install; + && env MACOSX_DEPLOYMENT_TARGET="11.0" make VERBOSE=1 -j 12 \ + && env DESTDIR="$PKGDIR/root/" MACOSX_DEPLOYMENT_TARGET="11.0" make install; } # Build for x86-64 but do not install; instead we will make some fat binaries inside the root. { cd "$PKGDIR/build_x86_64" \ - && cmake -DMAC_INJECT_GET_TASK_ALLOW=OFF \ + && cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \ -DWITH_GETTEXT=OFF \ -DRust_CARGO_TARGET=x86_64-apple-darwin \ - -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \ + -DCMAKE_OSX_ARCHITECTURES='x86_64' \ -DFISH_USE_SYSTEM_PCRE2=OFF "$SRC_DIR" \ - && make VERBOSE=1 -j 12; } + && env MACOSX_DEPLOYMENT_TARGET="10.9" make VERBOSE=1 -j 12; } # Fatten them up. for FILE in "$PKGDIR"/root/usr/local/bin/*; do diff --git a/cmake/MacApp.cmake b/cmake/MacApp.cmake index e3e0abafa..9a2b5566c 100644 --- a/cmake/MacApp.cmake +++ b/cmake/MacApp.cmake @@ -6,6 +6,9 @@ endif (NOT APPLE) # The source tree containing certain macOS resources. set(OSX_DIR ${CMAKE_CURRENT_SOURCE_DIR}/osx) +# 10.9 is the minimum supported version. +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") + set(RESOURCE_FILES ${OSX_DIR}/launch_fish.scpt ${OSX_DIR}/fish_term_icon.icns