Skip to content

Commit 2734cc8

Browse files
committed
unix: add aarch64-apple-darwin builds for CPython 3.8
This should address #118. I haven't tested these builds thoroughly and I'm a bit surprised the build seemed to _just work_. Surely there must be something wrong lingering under the surface...
1 parent ba88e60 commit 2734cc8

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

.github/workflows/apple.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,17 @@ jobs:
118118
matrix:
119119
build:
120120
# macOS on Apple hardware. Can't do PGO because GitHub Apple hardware
121-
# is Intel. Can't do Python 3.8 because we don't support cross-compiling
122-
# until 3.9.
121+
# is Intel.
122+
- target_triple: 'aarch64-apple-darwin'
123+
py: 'cpython-3.8'
124+
optimizations: 'debug'
125+
- target_triple: 'aarch64-apple-darwin'
126+
py: 'cpython-3.8'
127+
optimizations: 'noopt'
128+
- target_triple: 'aarch64-apple-darwin'
129+
py: 'cpython-3.8'
130+
optimizations: 'lto'
131+
123132
- target_triple: 'aarch64-apple-darwin'
124133
py: 'cpython-3.9'
125134
optimizations: 'debug'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# We don't support GDBM because it is GPL v3.
2+
_gdbm
3+
# Not available on macOS.
4+
nis
5+
# Not available on macOS.
6+
ossaudiodev
7+
# Not available on macOS.
8+
spwd
9+
10+
# Ideally this would only be disabled while cross-compiling. We can't build it
11+
# as a built-in extension via static-modules. And when letting setup.py build
12+
# it, it builds for the host architecture during cross-builds, which upsets
13+
# our validation script when it screens for the target machine type of
14+
# binaries. So just disable it.
15+
_testcapi
16+
17+
# Similar story as _testcapi. The extension exists to test the limited API,
18+
# which we don't really care about. Statically building it runs into problems
19+
# and cross-compiling emits wrong machine type when built via setup.py.
20+
xxlimited

cpython-unix/targets.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ aarch64-apple-darwin:
5656
host_platforms:
5757
- macos
5858
pythons_supported:
59+
- '3.8'
5960
- '3.9'
6061
- '3.10'
6162
needs_toolchain: true

src/release.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
3333
TripleRelease {
3434
suffixes: macos_suffixes.clone(),
3535
install_only_suffix: "pgo+lto",
36-
python_version_requirement: Some(VersionReq::parse(">=3.9").unwrap()),
36+
python_version_requirement: None,
3737
},
3838
);
3939
h.insert(

0 commit comments

Comments
 (0)