Skip to content

Commit f9e49ca

Browse files
committed
Updated to v0.22.1
Updated FreeBSD SDK to 13.4, and 14.1, for better C++-17 support. To solve `error: constexpr variable cannot have non-literal type 'const std::array<uint32_t, 8>' (aka 'const array<unsigned int, 8>')`
1 parent 7921ccd commit f9e49ca

File tree

3 files changed

+17
-36
lines changed

3 files changed

+17
-36
lines changed

M/MLX/build_tarballs.jl

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,38 @@
33
using BinaryBuilder, Pkg
44

55
name = "MLX"
6-
version = v"0.22.0"
6+
version = v"0.22.1"
77

88
sources = [
9-
GitSource("https://github.com/ml-explore/mlx.git", "1ce0c0fcb0f58cb9322981a65d267abc41cc2785"),
9+
GitSource("https://github.com/ml-explore/mlx.git", "1a1b2108ecfedfb8ccbfd63eadcc1c5f098fefee"),
1010
ArchiveSource("https://github.com/roblabla/MacOSX-SDKs/releases/download/macosx14.0/MacOSX14.0.sdk.tar.xz",
1111
"4a31565fd2644d1aec23da3829977f83632a20985561a2038e198681e7e7bf49"),
12+
ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/arm64/14.1-RELEASE/base.txz",
13+
"b25830252e0dce0161004a5b69a159cbbd92d5e92ae362b06158dbb3f2568d32";
14+
unpack_target="freebsd-base-aarch64"),
15+
ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/13.4-RELEASE/base.txz",
16+
"8e13b0a93daba349b8d28ad246d7beb327659b2ef4fe44d89f447392daec5a7c";
17+
unpack_target="freebsd-base-x86_64"),
1218
# Using the PyPI wheel for aarch64-apple-darwin to get the metal backend, which requires the `metal` compiler to build (which is practically impossible to use from the BinaryBuilder build env.)
13-
FileSource("https://files.pythonhosted.org/packages/62/2b/427896261bc8d940eff561e6199d1aee9dbdc7caa117486654a44d7d793c/mlx-$(version)-cp313-cp313-macosx_13_0_arm64.whl", "50d0d76826cfe939025791ce2c014e743ec7aff7aa67194ffaef40c40e574ef4"; filename = "mlx-aarch64-apple-darwin20.whl"),
14-
DirectorySource("./bundled"),
19+
FileSource("https://files.pythonhosted.org/packages/62/2b/427896261bc8d940eff561e6199d1aee9dbdc7caa117486654a44d7d793c/mlx-0.22.0-cp313-cp313-macosx_13_0_arm64.whl", "50d0d76826cfe939025791ce2c014e743ec7aff7aa67194ffaef40c40e574ef4"; filename = "mlx-aarch64-apple-darwin20.whl"),
1520
]
1621

1722
script = raw"""
1823
apk del cmake # Need CMake >= 3.30
1924
2025
if [[ "$target" == *-apple-darwin* ]]; then
21-
apple_sdk_root=$WORKSPACE/srcdir/MacOSX14.0.sdk
22-
sed -i "s!/opt/$bb_target/$bb_target/sys-root!$apple_sdk_root!" $CMAKE_TARGET_TOOLCHAIN
23-
sed -i "s!/opt/$bb_target/$bb_target/sys-root!$apple_sdk_root!" /opt/bin/$bb_full_target/$target-clang++
26+
sdk_root=$WORKSPACE/srcdir/MacOSX14.0.sdk
27+
sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" $CMAKE_TARGET_TOOLCHAIN
28+
sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" /opt/bin/$bb_full_target/$target-clang*
29+
elif [[ "$target" == *-unknown-freebsd* ]]; then
30+
sdk_root=$WORKSPACE/srcdir/freebsd-base-$(echo $target | cut -d - -f1)
31+
sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" $CMAKE_TARGET_TOOLCHAIN
32+
sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" /opt/bin/$bb_full_target/$target-clang*
33+
sed -i "s#/opt/$bb_target/$bb_target/lib#$sdk_root/usr/lib#" /opt/bin/$bb_full_target/$target-clang*
2434
fi
2535
2636
cd $WORKSPACE/srcdir/mlx
2737
28-
atomic_patch -p1 ../patches/nbits32-ops.patch
29-
atomic_patch -p1 ../patches/win32_freebsd-jit_compiler.patch
30-
3138
CMAKE_EXTRA_OPTIONS=()
3239
if [[ "$target" == x86_64-apple-darwin* ]]; then
3340
CMAKE_EXTRA_OPTIONS+=("-DMLX_ENABLE_X64_MAC=ON")

M/MLX/bundled/patches/nbits32-ops.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

M/MLX/bundled/patches/win32_freebsd-jit_compiler.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)