File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ if (NOT TARGET ggml AND NOT LLAMA_USE_SYSTEM_GGML)
159159 # ... otherwise assume ggml is added by a parent CMakeLists.txt
160160endif ()
161161
162+ if (MINGW)
163+ # Target Windows 8 for PrefetchVirtualMemory
164+ add_compile_definitions (_WIN32_WINNT=${GGML_WIN_VER} )
165+ endif ()
166+
162167#
163168# build the library
164169#
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ set(GGML_CPU_ARM_ARCH "" CACHE STRING "ggml: CPU architecture for ARM")
137137set (GGML_CPU_POWERPC_CPUTYPE "" CACHE STRING "ggml: CPU type for PowerPC" )
138138
139139
140- if (WIN32 )
140+ if (MINGW )
141141 set (GGML_WIN_VER "0x602" CACHE STRING "ggml: Windows version" )
142142endif ()
143143
Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ if (NOT MSVC)
125125endif ()
126126
127127if (MINGW)
128- # Target Windows 8 for PrefetchVirtualMemory
129128 add_compile_definitions (_WIN32_WINNT=${GGML_WIN_VER} )
130129endif ()
131130
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ struct llama_mmap::impl {
401401 }
402402 }
403403#else
404- throw std::runtime_error ( " PrefetchVirtualMemory unavailable " );
404+ LLAMA_LOG_DEBUG ( " skipping PrefetchVirtualMemory because _WIN32_WINNT < 0x602 \n " );
405405#endif
406406 }
407407 }
You can’t perform that action at this time.
0 commit comments