fix ggml-metal.m

This commit is contained in:
jmorganca 2024-05-19 00:06:26 -07:00
parent e86db9381a
commit bb795faa6c
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// go:build darwin,arm64
// go:build darwin arm64
/**
* llama.cpp - git 059031b8c40e1f4ba60586842c5b1ed3ddf61842

View File

@ -49,7 +49,7 @@ for patch in $dst_dir/patches/*.patch; do
git apply "$patch"
done
# add license
# add licenses
sha1=$(git -C $src_dir rev-parse @)
TEMP_LICENSE=$(mktemp)
@ -77,7 +77,7 @@ for IN in $dst_dir/*.{c,h,cpp,m,metal,cu}; do
done
# ggml-metal
sed -i '' '1s;^;// go:build darwin,arm64\n\n;' $dst_dir/ggml-metal.m
sed -i '' '1s;^;// go:build darwin arm64\n\n;' $dst_dir/ggml-metal.m
sed -e '/#include "ggml-common.h"/r ggml-common.h' -e '/#include "ggml-common.h"/d' < $dst_dir/ggml-metal.metal > temp.metal
TEMP_ASSEMBLY=$(mktemp)
echo ".section __DATA, __ggml_metallib" > $TEMP_ASSEMBLY