Skip to content

Commit 8ea45e6

Browse files
committed
build: use macOS 14 SDK (Xcode 15.0)
1 parent 51c97ff commit 8ea45e6

File tree

5 files changed

+21
-32
lines changed

5 files changed

+21
-32
lines changed

ci/test/00_setup_env_mac.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export CONTAINER_NAME=ci_macos_cross
1212
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
1313
export HOST=x86_64-apple-darwin
1414
export PACKAGES="cmake zip"
15-
export XCODE_VERSION=12.2
16-
export XCODE_BUILD_ID=12B45b
15+
export XCODE_VERSION=15.0
16+
export XCODE_BUILD_ID=15A240d
1717
export RUN_UNIT_TESTS=false
1818
export RUN_FUNCTIONAL_TESTS=false
1919
export GOAL="deploy"

contrib/devtools/symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def check_MACHO_min_os(binary) -> bool:
235235
return False
236236

237237
def check_MACHO_sdk(binary) -> bool:
238-
if binary.build_version.sdk == [11, 0, 0]:
238+
if binary.build_version.sdk == [14, 0, 0]:
239239
return True
240240
return False
241241

contrib/macdeploy/README.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,45 @@ When complete, it will have produced `Bitcoin-Core.zip`.
1414

1515
A free Apple Developer Account is required to proceed.
1616

17-
Our current macOS SDK
18-
(`Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz`)
19-
can be extracted from
20-
[Xcode_12.2.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip).
17+
Our macOS SDK can be extracted from
18+
[Xcode_15.xip](https://download.developer.apple.com/Developer_Tools/Xcode_15/Xcode_15.xip).
2119

2220
Alternatively, after logging in to your account go to 'Downloads', then 'More'
23-
and search for [`Xcode 12.2`](https://developer.apple.com/download/all/?q=Xcode%2012.2).
21+
and search for [`Xcode 15`](https://developer.apple.com/download/all/?q=Xcode%2015).
2422

2523
An Apple ID and cookies enabled for the hostname are needed to download this.
2624

27-
The `sha256sum` of the downloaded XIP archive should be `28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0`.
25+
The `sha256sum` of the downloaded XIP archive should be `4daaed2ef2253c9661779fa40bfff50655dc7ec45801aba5a39653e7bcdde48e`.
2826

29-
After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
30-
archive. This makes the SDK less-trivial to extract on non-macOS machines. One
31-
approach (tested on Debian Buster) is outlined below:
27+
To extract the `.xip` on Linux:
3228

3329
```bash
3430
# Install/clone tools needed for extracting Xcode.app
3531
apt install cpio
3632
git clone https://github.com/bitcoin-core/apple-sdk-tools.git
3733

38-
# Unpack Xcode_12.2.xip and place the resulting Xcode.app in your current
34+
# Unpack the .xip and place the resulting Xcode.app in your current
3935
# working directory
40-
python3 apple-sdk-tools/extract_xcode.py -f Xcode_12.2.xip | cpio -d -i
36+
python3 apple-sdk-tools/extract_xcode.py -f Xcode_15.xip | cpio -d -i
4137
```
4238

43-
On macOS the process is more straightforward:
39+
On macOS:
4440

4541
```bash
46-
xip -x Xcode_12.2.xip
42+
xip -x Xcode_15.xip
4743
```
4844

49-
### Step 2: Generating `Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app`
45+
### Step 2: Generating the SDK tarball from `Xcode.app`
5046

51-
To generate `Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz`, run
52-
the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the
53-
previous stage) as the first argument.
47+
To generate the SDK, run the script [`gen-sdk`](./gen-sdk) with the
48+
path to `Xcode.app` (extracted in the previous stage) as the first argument.
5449

5550
```bash
56-
# Generate a Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz from
57-
# the supplied Xcode.app
5851
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app'
5952
```
6053

61-
The `sha256sum` of the generated TAR.GZ archive should be `df75d30ecafc429e905134333aeae56ac65fac67cb4182622398fd717df77619`.
54+
The generated archive should be: `Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz`.
55+
The `sha256sum` should be `c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c282aa6892f55d`.
6256

6357
## Deterministic macOS App Notes
6458

contrib/macdeploy/gen-sdk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ def run():
6262

6363
out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
6464

65-
xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1")
66-
assert xcode_libcxx_dir.is_dir()
67-
6865
if args.out_sdktgz:
6966
out_sdktgz_path = pathlib.Path(args.out_sdktgz_path)
7067
else:
7168
# Construct our own out_sdktgz if not specified on the command line
7269
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
7370

7471
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
75-
"""Add all files in dir_to_add to tarfp, but prepent MEMBERPREFIX to the files'
72+
"""Add all files in dir_to_add to tarfp, but prepent alt_base_dir to the files'
7673
names
7774
7875
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:
@@ -107,8 +104,6 @@ def run():
107104
with tarfile.open(mode="w", fileobj=gzf, format=tarfile.GNU_FORMAT) as tarfp:
108105
print("Adding MacOSX SDK {} files...".format(sdk_version))
109106
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
110-
print("Adding libc++ headers...")
111-
tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name))
112107
print("Done! Find the resulting gzipped tarball at:")
113108
print(out_sdktgz_path.resolve())
114109

depends/hosts/darwin.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OSX_MIN_VERSION=11.0
2-
OSX_SDK_VERSION=11.0
3-
XCODE_VERSION=12.2
4-
XCODE_BUILD_ID=12B45b
2+
OSX_SDK_VERSION=14.0
3+
XCODE_VERSION=15.0
4+
XCODE_BUILD_ID=15A240d
55
LD64_VERSION=711
66

77
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers

0 commit comments

Comments
 (0)