@@ -34,6 +34,7 @@ if not exist %LOG_PATH% mkdir %LOG_PATH%
3434echo Working directory: %CD% > %LOG_FILE%
3535echo Output path: %OUTPUT_PATH% >> %LOG_FILE%
3636echo Library name: %LIB_NAME% >> %LOG_FILE%
37+ echo Java home: %JAVA_HOME% >> %LOG_FILE%
3738
3839echo ===================================================== >> %LOG_FILE%
3940echo SHARED LIBRARY >> %LOG_FILE%
@@ -52,8 +53,17 @@ for %%P in (%*) do (
5253 echo %%P | findstr /R /C:" ^C:.*\.lib" 1 > nul
5354 if !errorlevel! == 0 (
5455 echo *** >> %LOG_FILE%
55- set LIBS_EXT = !LIBS_EXT! %%P
56+ echo %%P | findstr /R /C:" \\jvm\.lib" 1 > nul
57+ if !errorlevel! == 0 (
58+ set " TMP = %%P "
59+ set " TMP = !TMP:svm\clibraries\windows-amd64 =! "
60+ set " LIBS_EXT = !LIBS_EXT! !TMP! "
61+ echo (replaced svm\clibraries\windows-amd64) >> %LOG_FILE%
62+ ) else (
63+ set " LIBS_EXT = !LIBS_EXT! %%P "
64+ )
5665 )
66+
5767)
5868echo !LIBS_EXT! >> %LOG_FILE%
5969
@@ -64,6 +74,6 @@ REM To create a static library on Windows we need to call lib.exe input.obj /OUT
6474REM We don't want to overwrite the .lib needed to compile against the .dll, so
6575REM we append "_s" to indicate that it is a static library.
6676if not exist %OUTPUT_PATH% mkdir %OUTPUT_PATH%
67- set LIB_ARGS = %LIB_NAME% .obj %JAVA_HOME% /lib/jvm.lib !LIBS_EXT! /OUT:%OUTPUT_PATH% \%LIB_NAME% _static.lib
77+ set LIB_ARGS = %LIB_NAME% .obj !LIBS_EXT! /OUT:%OUTPUT_PATH% \%LIB_NAME% _static.lib
6878echo lib.exe %LIB_ARGS% >> %LOG_FILE%
6979cmd /c lib.exe %LIB_ARGS%
0 commit comments