File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -888,15 +888,16 @@ ggml/src/ggml-metal-embed.o: \
888888 ggml/src/ggml-common.h
889889 @echo " Embedding Metal library"
890890 @sed -e ' /#include "ggml-common.h"/r ggml/src/ggml-common.h' -e ' /#include "ggml-common.h"/d' < ggml/src/ggml-metal.metal > ggml/src/ggml-metal-embed.metal
891- $(eval TEMP_ASSEMBLY=$(shell mktemp) )
892- @echo " .section __DATA, __ggml_metallib" > $(TEMP_ASSEMBLY )
893- @echo " .globl _ggml_metallib_start" >> $(TEMP_ASSEMBLY )
894- @echo " _ggml_metallib_start:" >> $(TEMP_ASSEMBLY )
895- @echo " .incbin \" ggml/src/ggml-metal-embed.metal\" " >> $(TEMP_ASSEMBLY )
896- @echo " .globl _ggml_metallib_end" >> $(TEMP_ASSEMBLY )
897- @echo " _ggml_metallib_end:" >> $(TEMP_ASSEMBLY )
898- @$(AS ) $(TEMP_ASSEMBLY ) -o $@
899- @rm -f ${TEMP_ASSEMBLY}
891+ $(eval TEMP_ASSEMBLY=$(shell mktemp -d) )
892+ @echo " .section __DATA, __ggml_metallib" > $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
893+ @echo " .globl _ggml_metallib_start" >> $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
894+ @echo " _ggml_metallib_start:" >> $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
895+ @echo " .incbin \" ggml/src/ggml-metal-embed.metal\" " >> $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
896+ @echo " .globl _ggml_metallib_end" >> $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
897+ @echo " _ggml_metallib_end:" >> $(TEMP_ASSEMBLY ) /ggml-metal-embed.s
898+ $(CC ) $(CFLAGS ) -c $(TEMP_ASSEMBLY ) /ggml-metal-embed.s -o $@
899+ @rm -f ${TEMP_ASSEMBLY} /ggml-metal-embed.s
900+ @rmdir ${TEMP_ASSEMBLY}
900901endif
901902endif # GGML_METAL
902903
You can’t perform that action at this time.
0 commit comments