Skip to content

Commit e5b6121

Browse files
committed
windows build
1 parent 6c2108b commit e5b6121

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

libxtracfg/c/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo lib
1414
ls -l -R %JAVA_HOME%
1515

1616
REM static
17-
cl.exe /c /W4 /I./ /I%JAVA_HOME%/include /I%JAVA_HOME%/include/%PLATFORM% /Folibxtracfg.obj ../wrapper/libxtracfg.c
17+
cl.exe /c /MT /W4 /I./ /I%JAVA_HOME%/include /I%JAVA_HOME%/include/%PLATFORM% /Folibxtracfg.obj ../wrapper/libxtracfg.c
1818
REM copy libxtracfgjni_static.lib libxtracfg.lib
1919
lib.exe /OUT:libxtracfg.lib /VERBOSE libxtracfg.obj libxtracfgjni_static.lib
2020

libxtracfg/c/native-image/static-compiler-windows.bat

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ for %%P in (%*) do (
2020
)
2121
)
2222

23-
REM Do a simple forward for any calls that are used to compile individual C files
24-
IF "%LIB_NAME%"=="" (
25-
cmd /c cl %*
26-
exit /b
27-
)
28-
2923
REM Setup log path and log file
3024
set LOG_PATH=%OUTPUT_PATH%\logs
3125
set LOG_FILE=%LOG_PATH%\compiler_commands.txt
3226
if not exist %LOG_PATH% mkdir %LOG_PATH%
3327

28+
REM Do a simple forward for any calls that are used to compile individual C files
29+
IF "%LIB_NAME%"=="" (
30+
echo Forwarding to cl.exe for compiling C file: %* >> %LOG_FILE%
31+
cmd /c cl /MT %*
32+
exit /b
33+
)
34+
3435
echo Working directory: %CD% > %LOG_FILE%
3536
echo Output path: %OUTPUT_PATH% >> %LOG_FILE%
3637
echo Library name: %LIB_NAME% >> %LOG_FILE%
@@ -42,7 +43,7 @@ echo ===================================================== >> %LOG_FILE%
4243
REM Modify the arguments if needed
4344
set CL_ARGS=%*
4445
echo cl.exe %CL_ARGS% >> %LOG_FILE%
45-
cmd /c cl.exe %CL_ARGS%
46+
cmd /c cl.exe /MT %CL_ARGS%
4647

4748
echo ===================================================== >> %LOG_FILE%
4849
echo STATIC EXTERNAL >> %LOG_FILE%
@@ -57,7 +58,7 @@ for %%P in (%*) do (
5758
)
5859

5960
)
60-
REM set "LIBS_EXT=!LIBS_EXT:svm\clibraries\windows-amd64\jvm.lib=jvm.lib!"
61+
set "LIBS_EXT=!LIBS_EXT:svm\clibraries\windows-amd64\jvm.lib=jvm.lib!"
6162
echo !LIBS_EXT! >> %LOG_FILE%
6263

6364
echo ===================================================== >> %LOG_FILE%

0 commit comments

Comments
 (0)