Fix BUILD_PREFIX
+opy %LIBRARY_LIB%\pthreads.lib %LIBRARY_LIB%\pthread.lib
+copy %LIBRARY_LIB%\pthreads.lib %LIBRARY_LIB%\m.lib
+copy %BUILD_PREFIX%\Library\bin\llvm-ar.exe %BUILD_PREFIX%\Library\bin\ar.exe
+copy %BUILD_PREFIX%\Library\bin\llvm-as.exe %BUILD_PREFIX%\Library\bin\as.exe
+
copy "%RECIPE_DIR%\build.sh" .
set PREFIX=%PREFIX:\=/%
set BUILD_PREFIX=%BUILD_PREFIX:\=/%
@@ -6,12 +11,6 @@ set SRC_DIR=%SRC_DIR:\=/%
set MSYSTEM=MINGW%ARCH%
set MSYS2_PATH_TYPE=inherit
set CHERE_INVOKING=1
-
-copy %LIBRARY_LIB%\pthreads.lib %LIBRARY_LIB%\pthread.lib
-copy %LIBRARY_LIB%\pthreads.lib %LIBRARY_LIB%\m.lib
-copy %BUILD_PREFIX%\Library\bin\llvm-ar.exe %BUILD_PREFIX%\Library\bin\ar.exe
-copy %BUILD_PREFIX%\Library\bin\llvm-as.exe %BUILD_PREFIX%\Library\bin\as.exe
-
bash -lc "./build.sh"
if errorlevel 1 exit 1
