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)
159
159
# ... otherwise assume ggml is added by a parent CMakeLists.txt
160
160
endif ()
161
161
162
+ if (MINGW )
163
+ # Target Windows 8 for PrefetchVirtualMemory
164
+ add_compile_definitions (_WIN32_WINNT=${GGML_WIN_VER} )
165
+ endif ()
166
+
162
167
#
163
168
# build the library
164
169
#
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")
137
137
set (GGML_CPU_POWERPC_CPUTYPE "" CACHE STRING "ggml: CPU type for PowerPC" )
138
138
139
139
140
- if (WIN32 )
140
+ if (MINGW )
141
141
set (GGML_WIN_VER "0x602" CACHE STRING "ggml: Windows version" )
142
142
endif ()
143
143
Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ if (NOT MSVC)
125
125
endif ()
126
126
127
127
if (MINGW )
128
- # Target Windows 8 for PrefetchVirtualMemory
129
128
add_compile_definitions (_WIN32_WINNT=${GGML_WIN_VER} )
130
129
endif ()
131
130
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ struct llama_mmap::impl {
401
401
}
402
402
}
403
403
#else
404
- throw std::runtime_error ( " PrefetchVirtualMemory unavailable " );
404
+ LLAMA_LOG_DEBUG ( " skipping PrefetchVirtualMemory because _WIN32_WINNT < 0x602 \n " );
405
405
#endif
406
406
}
407
407
}
You can’t perform that action at this time.
0 commit comments