@@ -28,7 +28,7 @@ if not exist %LOG_PATH% mkdir %LOG_PATH%
2828REM Do a simple forward for any calls that are used to compile individual C files
2929IF " %LIB_NAME% " == " " (
3030 echo Forwarding to cl.exe for compiling C file: %* >> %LOG_FILE%
31- cmd /c cl /MT %*
31+ cmd /c cl.exe %*
3232 exit /b
3333)
3434
@@ -42,16 +42,15 @@ echo SHARED LIBRARY >> %LOG_FILE%
4242echo ===================================================== >> %LOG_FILE%
4343REM Modify the arguments if needed
4444set CL_ARGS = %*
45- set " CL_ARGS = %CL_ARGS:/MD /LD =/MT % "
46- set " CL_ARGS = %CL_ARGS:/NODEFAULTLIB:LIBCMT =% "
45+ REM set "CL_ARGS=%CL_ARGS:/MD /LD=/MT%"
46+ REM set "CL_ARGS=%CL_ARGS:/NODEFAULTLIB:LIBCMT=%"
4747echo cl.exe %CL_ARGS% >> %LOG_FILE%
4848cmd /c cl.exe %CL_ARGS%
4949
5050echo ===================================================== >> %LOG_FILE%
5151echo STATIC EXTERNAL >> %LOG_FILE%
5252echo ===================================================== >> %LOG_FILE%
5353set LIBS_EXT =
54- set LIBS_EXT_DIRS =
5554for %%P in (%* ) do (
5655 echo %%P >> %LOG_FILE%
5756 echo %%P | findstr /R /C:" ^C:.*\.lib" 1 > nul
@@ -71,6 +70,6 @@ REM To create a static library on Windows we need to call lib.exe input.obj /OUT
7170REM We don't want to overwrite the .lib needed to compile against the .dll, so
7271REM we append "_s" to indicate that it is a static library.
7372if not exist %OUTPUT_PATH% mkdir %OUTPUT_PATH%
74- set LIB_ARGS = %LIB_NAME% .obj /OUT:%OUTPUT_PATH% \%LIB_NAME% _static.lib
73+ set LIB_ARGS = %LIB_NAME% .obj !LIBS_EXT! /OUT:%OUTPUT_PATH% \%LIB_NAME% _static.lib
7574echo lib.exe %LIB_ARGS% >> %LOG_FILE%
7675cmd /c lib.exe %LIB_ARGS%
0 commit comments