mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
f670118cce
05aca093819be276ac7d648472c6ed5c7d235cc5 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)
Pull request description:
This PR is:
- required to [switch](https://github.com/bitcoin/bitcoin/pull/28622) to macOS 14 SDK (Xcode 15).
- an alternative to https://github.com/bitcoin/bitcoin/pull/28732 and https://github.com/bitcoin/bitcoin/pull/28775.
Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.
Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
```c++
#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
/* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#endif
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
```
In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
```c++
#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
#if defined(__has_builtin) && __has_builtin(__is_target_os)
#if __is_target_os(macos)
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
#endif
#elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
#endif /* __has_builtin(__is_target_os) && __is_target_os(macos) */
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
```
The latter macro is not provided by LLVM Clang until
|
||
---|---|---|
.. | ||
backtrace.mk | ||
bdb.mk | ||
boost.mk | ||
capnp.mk | ||
expat.mk | ||
fontconfig.mk | ||
freetype.mk | ||
gmp.mk | ||
libevent.mk | ||
libmultiprocess.mk | ||
libnatpmp.mk | ||
libXau.mk | ||
libxcb_util_image.mk | ||
libxcb_util_keysyms.mk | ||
libxcb_util_render.mk | ||
libxcb_util_wm.mk | ||
libxcb_util.mk | ||
libxcb.mk | ||
libxkbcommon.mk | ||
miniupnpc.mk | ||
native_capnp.mk | ||
native_cctools.mk | ||
native_clang.mk | ||
native_ds_store.mk | ||
native_libdmg-hfsplus.mk | ||
native_libmultiprocess.mk | ||
native_libtapi.mk | ||
native_mac_alias.mk | ||
packages.mk | ||
qrencode.mk | ||
qt.mk | ||
sqlite.mk | ||
systemtap.mk | ||
xcb_proto.mk | ||
xproto.mk | ||
zeromq.mk |