-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: Patch Qt to handle minimum macOS version properly #28851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change is required to switch to macOS 14 SDK (Xcode 15).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK. Looks better than the previous two changes, and it's clearer what's being done. Picked it into #28622. |
Guix build (aarch64): d832f85daf44833b8bdb8fbf3947e0c6e7a1364cf33991e8f5c32a68e3321c3b guix-build-05aca093819b/output/arm64-apple-darwin/SHA256SUMS.part
6c163bfdb697ff4821e87645ad62bd1588c862cad07ec4ae901835e2368aba69 guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.tar.gz
bc73c31b3b45588264685ee98449e8cb6eff8885b5cb696d782dbb95f1608ce6 guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.zip
e13de2a319b857a7abbc6dbae3f3e22a3c7d75389f27d4bb48b0170bf760dbc4 guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin.tar.gz
2daf2522477cb6694944ee4174b5dbb18c2399da92b67372b80bb43915698280 guix-build-05aca093819b/output/dist-archive/bitcoin-05aca093819b.tar.gz
7ecd0ded664945a684f5de03658bbcfcf9cc201f0cf49ee30328b7077a7da943 guix-build-05aca093819b/output/x86_64-apple-darwin/SHA256SUMS.part
07991b5012af6e30a331faecf77ca1d4770c3f2f49a31b7c70069e0c23c02d2d guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.tar.gz
284fbfb741a3002d225ebedbf393ec1c0f2f6fd9d8e9ba8cf4733c67cf2222f9 guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.zip
abcba6d0de6bea343ba916c504b5d9aaaed2ba6113652eb891176eead09cdc1a guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin.tar.gz |
My Guix builds:
|
Getting the same hashes as @hebasto. Briefly tested that the binary still works on Intel macOS 13.6 |
Now we can actually almost do #21778, and avoid having to do this patching. |
Could be closed in favour of #28880. |
Guix builds (on x86_64)
|
lgtm ACK 05aca09 |
…properly 05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15). - an alternative to bitcoin#28732 and bitcoin#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 llvm/llvm-project@c8e2dd8, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca09 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
…properly 05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15). - an alternative to bitcoin#28732 and bitcoin#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 llvm/llvm-project@c8e2dd8, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca09 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
…properly 05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15). - an alternative to bitcoin#28732 and bitcoin#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 llvm/llvm-project@c8e2dd8, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca09 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
…properly 05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15). - an alternative to bitcoin#28732 and bitcoin#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 llvm/llvm-project@c8e2dd8, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca09 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
…properly 05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15). - an alternative to bitcoin#28732 and bitcoin#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 llvm/llvm-project@c8e2dd8, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca09 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
c75a0d4 Merge bitcoin#29177: build: Fix check whether `-latomic` needed (fanquake) f670118 Merge bitcoin#28851: build: Patch Qt to handle minimum macOS version properly (fanquake) 685ee8a Merge bitcoin#28884: doc: remove x86_64 build assumption from depends doc (fanquake) 47f6126 Merge bitcoin#28881: doc: remove mention of missing bdb being a configure error (fanquake) a9021db Merge bitcoin#28777: doc: update docs for `CHECK_ATOMIC` macro (fanquake) d5e15df Merge bitcoin#26839: Add support for RNDR/RNDRRS for AArch64 on Linux (Andrew Chow) 5aedcbf Merge bitcoin#28778: depends: drop -O1 workaround from arm64 apple Qt build (fanquake) 95a8d8c Merge bitcoin#21161: Fee estimation: extend bucket ranges consistently (glozow) f4ea48e Merge bitcoin#28693: build: Include `config/bitcoin-config.h` explicitly in `util/trace.h` (fanquake) f160e0d Merge bitcoin#28691: refactor: Remove CBlockFileInfo::SetNull (fanquake) 0278163 Merge bitcoin#28697: fuzz: Increase merge -rss_limit_mb (fanquake) 90a1fb0 Merge bitcoin#28650: fuzz: Merge with -set_cover_merge=1 (fanquake) f007abd Merge bitcoin#28459: build: add `-mbranch-protection=bti` (aarch64) to hardening flags (fanquake) af8d124 Merge bitcoin#28624: docs: fix typo (fanquake) c740264 Merge bitcoin#28532: qt: enable` -ltcg` for windows under LTO (fanquake) ccd3920 Merge bitcoin#28556: doc: fix link to developer-notes.md file in multiprocess.md (fanquake) Pull request description: ## Issue being fixed or feature implemented Batch of trivial backports ## What was done? See commits ## How Has This Been Tested? built locally; large combined merge passed tests locally ## Breaking Changes Should be none ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK c75a0d4 Tree-SHA512: 035dc3fa9812c7f381946ae4798b8e729a58b38a090d94502a8d992e9cfaab3307173c602d7b782c637a79c5c41b62570dc73bb4bb367e4505a039964926181b
Summary: ``` This change is required to switch to macOS 14 SDK (Xcode 15). ``` Backport of [[bitcoin/bitcoin#28851 | core#28851]]. Depends on D17205. Test Plan: Run the GUIX builds. Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D17206
This PR is:
native_clang
up to 17.0.2 #28732 and build: Patch Qt to handle minimum macOS version properly #28775.Qt relies on the
__MAC_OS_X_VERSION_MIN_REQUIRED
macro, which is set in theAvailabilityInternal.h
SDK header tothe 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:In the other hand, Xcode 15 SDK expects a general
__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
macro:The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.
The suggested patch makes Qt "borrow" the
__MAC_OS_X_VERSION_MIN_REQUIRED
value fromMAC_OS_X_VERSION_MIN_REQUIRED
, which is set in theAvailabilityMacros.h
SDK header.