-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.cmd
More file actions
45 lines (38 loc) · 1.18 KB
/
build.cmd
File metadata and controls
45 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
REM WayInfer build script — Windows (MSVC + AVX2)
REM
REM Prerequisites:
REM - Visual Studio 2022 Build Tools (or full VS)
REM - Windows 10/11 SDK
REM
REM Usage: build.cmd
REM Output: build\wayinfer.exe
setlocal
REM --- Adjust these paths if your MSVC/SDK versions differ ---
set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207"
set "SDK=C:\Program Files (x86)\Windows Kits\10"
set "SDKVER=10.0.26100.0"
set "PATH=%MSVC%\bin\Hostx64\x64;%PATH%"
if not exist build mkdir build
cl.exe /nologo /O2 /W3 /arch:AVX512 /DPLATFORM_WINDOWS=1 /TP /std:c++20 /D_CRT_SECURE_NO_WARNINGS ^
/I"%MSVC%\include" ^
/I"%SDK%\Include\%SDKVER%\ucrt" ^
/I"%SDK%\Include\%SDKVER%\um" ^
/I"%SDK%\Include\%SDKVER%\shared" ^
/I"src" ^
src\gguf_chat.c ^
src\gguf.c ^
src\tensor_engine.c ^
src\platform\io_win.c ^
src\platform\threadpool_win.c ^
/Fe:build\wayinfer.exe ^
/Fo:build\ ^
/link /LIBPATH:"%MSVC%\lib\x64" /LIBPATH:"%SDK%\Lib\%SDKVER%\ucrt\x64" /LIBPATH:"%SDK%\Lib\%SDKVER%\um\x64"
if %errorlevel%==0 (
echo.
echo Build successful: build\wayinfer.exe
) else (
echo.
echo Build FAILED
)
exit /b %errorlevel%