Clang support

This commit is contained in:
hunbernd 2020-05-30 02:16:59 +02:00
parent 5a7b9e416c
commit cd751f12d4
10 changed files with 35 additions and 20 deletions

View file

@ -26,6 +26,9 @@ if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%
:: Plugins
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
:: Clang
if "%ParamClang%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-clang"
:: Initialize environment
call "%~dp0env.bat" %*
if errorlevel 2 exit /B 2
@ -63,7 +66,11 @@ echo Qt %QtVersion% >> buildinfo.txt
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath
call "%ToolsPath%\msys2-path.bat" "%EnvMSYS2Path%" MSYS2EnvMSYS2Path
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
if "%ParamClang%"=="1" (
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-clang-g++ %RS_QMAKE_CONFIG%"
) else (
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
)
if errorlevel 1 goto error
echo.

View file

@ -7,6 +7,7 @@ set ParamAutologin=0
set ParamPlugins=0
set ParamTor=0
set ParamWebui=0
set ParamClang=0
set CoreCount=%NUMBER_OF_PROCESSORS%
set RS_QMAKE_CONFIG=
@ -31,6 +32,8 @@ if "%~1" NEQ "" (
set ParamWebui=1
) else if "%%~a"=="singlethread" (
set CoreCount=1
) else if "%%~a"=="clang" (
set ParamClang=1
) else if "%%~a"=="CONFIG+" (
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% %1
) else (
@ -61,6 +64,10 @@ if "%Param64%"=="1" (
set RsMSYS2Architecture=x86_64
)
if "%ParamClang%"=="1" (
set RsArchitecture=%RsArchitecture%-Clang
)
if "%RsBit%"=="" goto :usage
if "%ParamRelease%"=="1" (
@ -89,7 +96,7 @@ exit /B 0
:usage
echo.
echo Usage: 32^|64 release^|debug [version autologin plugins webui singlethread]
echo Usage: 32^|64 release^|debug [autologin plugins webui singlethread clang]
echo.
echo Mandatory parameter
echo 32^|64 32-bit or 64-bit Version
@ -100,6 +107,7 @@ echo autologin Build with autologin
echo plugins Build plugins
echo webui Enable JsonAPI and pack webui files
echo singlethread Use only 1 thread for building
echo clang Use clang compiler instead of GCC
echo.
echo Parameter for pack
echo tor Pack tor version