@@ -204,8 +204,11 @@ function build_libsif(
204204 if isfile (" $fname .f" )
205205 @static if Sys. iswindows ()
206206 mingw = Int == Int64 ? " mingw64" : " mingw32"
207- gfortran = joinpath (artifact " mingw-w64" , mingw, " bin" , " gfortran.exe" )
208- run (` $gfortran -O3 -c -fPIC $fname .f` )
207+ bindir = joinpath (artifact " mingw-w64" , mingw, " bin" )
208+ gfortran = joinpath (bindir, " gfortran.exe" )
209+ withenv (" PATH" => string (bindir, ' ;' , ENV [" PATH" ])) do
210+ run (` $gfortran -O3 -c -fPIC $fname .f` )
211+ end
209212 else
210213 run (` gfortran -O3 -c -fPIC $fname .f` )
211214 end
@@ -222,11 +225,16 @@ function build_libsif(
222225 elseif Sys. iswindows ()
223226 @static if Sys. iswindows ()
224227 mingw = Int == Int64 ? " mingw64" : " mingw32"
225- gfortran = joinpath (artifact " mingw-w64" , mingw, " bin" , " gfortran.exe" )
228+ bindir = joinpath (artifact " mingw-w64" , mingw, " bin" )
229+ gfortran = joinpath (bindir, " gfortran.exe" )
226230 if standalone
227- run (` $gfortran -shared -o $libsif_name $object_files ` )
231+ withenv (" PATH" => string (bindir, ' ;' , ENV [" PATH" ])) do
232+ run (` $gfortran -shared -o $libsif_name $object_files ` )
233+ end
228234 else
229- run (` $gfortran -shared -o $libsif_name $object_files -Wl,--whole-archive $libcutest -Wl,--no-whole-archive` )
235+ withenv (" PATH" => string (bindir, ' ;' , ENV [" PATH" ])) do
236+ run (` $gfortran -shared -o $libsif_name $object_files -Wl,--whole-archive $libcutest -Wl,--no-whole-archive` )
237+ end
230238 end
231239 end
232240 else
0 commit comments