|
3 | 3 | using BinaryBuilder, Pkg
|
4 | 4 |
|
5 | 5 | name = "MLX"
|
6 |
| -version = v"0.22.0" |
| 6 | +version = v"0.22.1" |
7 | 7 |
|
8 | 8 | sources = [
|
9 |
| - GitSource("https://github.com/ml-explore/mlx.git", "1ce0c0fcb0f58cb9322981a65d267abc41cc2785"), |
| 9 | + GitSource("https://github.com/ml-explore/mlx.git", "1a1b2108ecfedfb8ccbfd63eadcc1c5f098fefee"), |
10 | 10 | ArchiveSource("https://github.com/roblabla/MacOSX-SDKs/releases/download/macosx14.0/MacOSX14.0.sdk.tar.xz",
|
11 | 11 | "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"), |
12 | 18 | # 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"), |
15 | 20 | ]
|
16 | 21 |
|
17 | 22 | script = raw"""
|
18 | 23 | apk del cmake # Need CMake >= 3.30
|
19 | 24 |
|
20 | 25 | 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* |
24 | 34 | fi
|
25 | 35 |
|
26 | 36 | cd $WORKSPACE/srcdir/mlx
|
27 | 37 |
|
28 |
| -atomic_patch -p1 ../patches/nbits32-ops.patch |
29 |
| -atomic_patch -p1 ../patches/win32_freebsd-jit_compiler.patch |
30 |
| -
|
31 | 38 | CMAKE_EXTRA_OPTIONS=()
|
32 | 39 | if [[ "$target" == x86_64-apple-darwin* ]]; then
|
33 | 40 | CMAKE_EXTRA_OPTIONS+=("-DMLX_ENABLE_X64_MAC=ON")
|
|
0 commit comments