Windows: Rework clang scripts, and enable by default on Windows ARM64
This switches clang to be the default compiler on Windows ARM64, allowing for an override to MSVC. Turns out MSVC builds have been broken for months, but nobody checked, so I'm just switching them off for now and setting clang as the default. These updated scripts allow for the msbuild generator to use an external (ie, non-MSVC) clang installation properly, otherwise they failed. They also allow for users to specify their own desired clang compiler via an environment variable. An update to the docs will come seperately. Pull Request: https://projects.blender.org/blender/blender/pulls/134566
This commit is contained in:
20
make.bat
20
make.bat
@@ -47,6 +47,18 @@ if "%LICENSE%" == "1" (
|
||||
call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
|
||||
if errorlevel 1 goto EOF
|
||||
|
||||
REM Enforce the default compiler to be clang on ARM64
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
if not "%WITH_CLANG%" == "1" (
|
||||
if "%WITH_MSVC%" == "1" (
|
||||
echo WARNING, MSVC compilation on Windows ARM64 is unsupported, and errors may occur.
|
||||
) else (
|
||||
echo Windows ARM64 builds with clang by default, enabling. If you wish to use MSVC ^(unsupported^), please use the msvc switch.
|
||||
set WITH_CLANG=1
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if "%BUILD_VS_YEAR%" == "" (
|
||||
call "%BLENDER_DIR%\build_files\windows\autodetect_msvc.cmd"
|
||||
if errorlevel 1 (
|
||||
@@ -98,6 +110,14 @@ if "%CMAKE%" == "" (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%WITH_CLANG%" == "1" (
|
||||
call "%BLENDER_DIR%\build_files\windows\find_llvm.cmd"
|
||||
if errorlevel 1 (
|
||||
echo LLVM/Clang not found ^(try with the 'verbose' switch for more information^)
|
||||
goto EOF
|
||||
)
|
||||
)
|
||||
|
||||
echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
|
||||
|
||||
call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
|
||||
|
||||
Reference in New Issue
Block a user