Skip to content

Commit 53fa63c

Browse files
committed
windows build
1 parent 24d2a6d commit 53fa63c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ echo SHARED LIBRARY >> %LOG_FILE%
4242
echo ===================================================== >> %LOG_FILE%
4343
REM Modify the arguments if needed
4444
set CL_ARGS=%*
45+
set "CL_ARGS=%CL_ARGS:/MD /LD=/MT%"
46+
set "CL_ARGS=%CL_ARGS:/NODEFAULTLIB:LIBCMT=%"
4547
echo cl.exe %CL_ARGS% >> %LOG_FILE%
46-
cmd /c cl.exe /MT %CL_ARGS%
48+
cmd /c cl.exe %CL_ARGS%
4749

4850
echo ===================================================== >> %LOG_FILE%
4951
echo STATIC EXTERNAL >> %LOG_FILE%
@@ -69,6 +71,6 @@ REM To create a static library on Windows we need to call lib.exe input.obj /OUT
6971
REM We don't want to overwrite the .lib needed to compile against the .dll, so
7072
REM we append "_s" to indicate that it is a static library.
7173
if not exist %OUTPUT_PATH% mkdir %OUTPUT_PATH%
72-
set LIB_ARGS=%LIB_NAME%.obj !LIBS_EXT! /OUT:%OUTPUT_PATH%\%LIB_NAME%_static.lib
74+
set LIB_ARGS=%LIB_NAME%.obj /OUT:%OUTPUT_PATH%\%LIB_NAME%_static.lib
7375
echo lib.exe %LIB_ARGS% >> %LOG_FILE%
7476
cmd /c lib.exe %LIB_ARGS%

0 commit comments

Comments
 (0)