mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Get rid of macOS hack to try having the filesystem cake and eat it too
This commit is contained in:
@@ -83,7 +83,7 @@ jobs:
|
|||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||||
make -j CXXFLAGS="-O3 -flto -DNDEBUG -mmacosx-version-min=10.9 -I include/hacks" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
|
make -j CXXFLAGS="-O3 -flto -DNDEBUG -mmacosx-version-min=10.9" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
run: |
|
run: |
|
||||||
zip --junk-paths rgbds-${{ env.version }}-macos-x86_64.zip rgb{asm,link,fix,gfx} man/* .github/scripts/install.sh
|
zip --junk-paths rgbds-${{ env.version }}-macos-x86_64.zip rgb{asm,link,fix,gfx} man/* .github/scripts/install.sh
|
||||||
|
|||||||
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@@ -98,7 +98,7 @@ jobs:
|
|||||||
- name: Build & install
|
- name: Build & install
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||||
make -j CXXFLAGS="-O3 -flto -DNDEBUG -mmacosx-version-min=10.9 -I include/hacks" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
|
make -j CXXFLAGS="-O3 -flto -DNDEBUG -mmacosx-version-min=10.9" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
run: |
|
run: |
|
||||||
mkdir bins
|
mkdir bins
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: MIT */
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
|
|
||||||
#include_next <__availability>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a hack to make RGBDS build on macOS 10.14 and below. Without it, we get errors like:
|
|
||||||
* error: 'path' is unavailable: introduced in macOS 10.15
|
|
||||||
* The hack weakens the `std::filesystem::path` availability error into a warning, by removing
|
|
||||||
* `strict` from the availability macros (for information on the `availability` attribute, see
|
|
||||||
* https://releases.llvm.org/17.0.1/tools/clang/docs/AttributeReference.html#availability). This is
|
|
||||||
* acceptable because what we need of `std::filesystem::path` was already supported in macOS 10.14
|
|
||||||
* (the last version to support 32-bit, hence in demand despite being superseded by 10.15 in 2019).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
|
|
||||||
# undef _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
|
|
||||||
# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \
|
|
||||||
_Pragma("clang attribute push(__attribute__((availability(macosx,introduced=10.15))), apply_to=any(function,record))") \
|
|
||||||
_Pragma("clang attribute push(__attribute__((availability(ios,introduced=13.0))), apply_to=any(function,record))") \
|
|
||||||
_Pragma("clang attribute push(__attribute__((availability(tvos,introduced=13.0))), apply_to=any(function,record))") \
|
|
||||||
_Pragma("clang attribute push(__attribute__((availability(watchos,introduced=6.0))), apply_to=any(function,record))")
|
|
||||||
|
|
||||||
# define _LIBCPP_AVAILABILITY_FILESYSTEM \
|
|
||||||
__attribute__((availability(macosx,introduced=10.15))) \
|
|
||||||
__attribute__((availability(ios,introduced=13.0))) \
|
|
||||||
__attribute__((availability(tvos,introduced=13.0))) \
|
|
||||||
__attribute__((availability(watchos,introduced=6.0)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __APPLE__
|
|
||||||
Reference in New Issue
Block a user