@@ -306,12 +306,15 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
306306 # MK_CXXFLAGS += -mssse3
307307endif
308308
309- # The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
310- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
311- # https://github.com/ggerganov/llama.cpp/issues/2922
312309ifneq '' '$(findstring mingw,$(shell $(CC ) -dumpmachine) ) '
310+ # The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
311+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
312+ # https://github.com/ggerganov/llama.cpp/issues/2922
313313 MK_CFLAGS += -Xassembler -muse-unaligned-vector-move
314314 MK_CXXFLAGS += -Xassembler -muse-unaligned-vector-move
315+
316+ # Target Windows 8 for PrefetchVirtualMemory
317+ MK_CPPFLAGS += -D_WIN32_WINNT=0x602
315318endif
316319
317320ifneq ($(filter aarch64% ,$(UNAME_M ) ) ,)
@@ -730,16 +733,16 @@ tests/test-quantize-perf: tests/test-quantize-perf.cpp ggml.o $(OBJS)
730733tests/test-sampling : tests/test-sampling.cpp ggml.o llama.o $(OBJS )
731734 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
732735
733- tests/test-tokenizer-0-falcon : tests/test-tokenizer-0-falcon.cpp ggml.o llama.o $(COMMON_DEPS ) $(OBJS )
736+ tests/test-tokenizer-0-falcon : tests/test-tokenizer-0-falcon.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
734737 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
735738
736- tests/test-tokenizer-0-llama : tests/test-tokenizer-0-llama.cpp ggml.o llama.o $(COMMON_DEPS ) $(OBJS )
739+ tests/test-tokenizer-0-llama : tests/test-tokenizer-0-llama.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
737740 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
738741
739- tests/test-tokenizer-1-bpe : tests/test-tokenizer-1-bpe.cpp ggml.o llama.o $(COMMON_DEPS ) $(OBJS )
742+ tests/test-tokenizer-1-bpe : tests/test-tokenizer-1-bpe.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
740743 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
741744
742- tests/test-tokenizer-1-llama : tests/test-tokenizer-1-llama.cpp ggml.o llama.o $(COMMON_DEPS ) $(OBJS )
745+ tests/test-tokenizer-1-llama : tests/test-tokenizer-1-llama.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
743746 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
744747
745748tests/test-rope : tests/test-rope.cpp ggml.o $(OBJS )
0 commit comments