1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: always define _UNICODE and UNICODE on Windows

This commit is contained in:
vitalyster
2019-09-17 14:56:32 +03:00
committed by Alexander Medvednikov
parent 79a98d7bcf
commit 52c5f0172e
6 changed files with 12 additions and 16 deletions

View File

@@ -28,15 +28,15 @@ if not exist "%gccpath%" (
goto:msvcstrap
)
gcc -std=gnu11 -DUNICODE -D_UNICODE -w -o v2.exe vc\v_win.c
if %ERRORLEVEL% GEQ 1 (
gcc -DUNICODE -D_UNICODE -std=gnu11 -w -o v2.exe vc\v_win.c
if %ERRORLEVEL% NEQ 0 (
echo gcc failed to compile - Create an issue at 'https://github.com/vlang'
exit /b 1
)
echo Building v.v...
v2.exe -o v.exe compiler
if %ERRORLEVEL% GEQ 1 (
if %ERRORLEVEL% NEQ 0 (
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
exit /b 1
)
@@ -60,16 +60,15 @@ if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
goto :nocompiler
)
cl.exe /nologo /w /volatile:ms /D_UNICODE /DUNICODE /Fo.v.c.obj /O2 /MD vc\v_win.c user32.lib kernel32.lib advapi32.lib shell32.lib /link /NOLOGO /OUT:v2.exe /INCREMENTAL:NO
if %ERRORLEVEL% GEQ 1 (
cl.exe -DUNICODE -D_UNICODE /nologo /w /volatile:ms /Fo.v.c.obj /O2 /MD vc\v_win.c user32.lib kernel32.lib advapi32.lib shell32.lib /link /NOLOGO /OUT:v2.exe /INCREMENTAL:NO
if %ERRORLEVEL% NEQ 0 (
echo cl.exe failed to build V
goto :compileerror
)
echo rebuild from source
v2.exe -os msvc -o v.exe compiler
if %ERRORLEVEL% GEQ 1 (
if %ERRORLEVEL% NEQ 0 (
echo V failed to build itself
goto :compileerror
)