mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
This hasn't worked for a long long time, to the point we forcibly disabled internal manifests for clang. Took a bit of time, but it appears that clang-lld is corrupting the manifest we embed, leading to startup issues. see https://github.com/llvm/llvm-project/issues/120394 for details. Since we provide this information already in our manifests, we can just disable the option for clang to also set it and side step the issue. Pull Request: https://projects.blender.org/blender/blender/pulls/155917
63 lines
No EOL
1.5 KiB
Batchfile
63 lines
No EOL
1.5 KiB
Batchfile
ninja --version 1>NUL 2>&1
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "Ninja not detected in the path"
|
|
exit /b 1
|
|
)
|
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
|
|
|
|
if "%BUILD_WITH_SCCACHE%"=="1" (
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_WINDOWS_SCCACHE=On
|
|
if NOT "%verbose%" == "" (
|
|
echo Enabling sccache
|
|
)
|
|
)
|
|
|
|
if "%WITH_CLANG%" == "1" (
|
|
REM We can assume that we have a working copy via find_llvm.cmd
|
|
set CC=%LLVM_DIR%\bin\clang-cl
|
|
set CXX=%LLVM_DIR%\bin\clang-cl
|
|
set CFLAGS=-m64
|
|
set CXXFLAGS=-m64
|
|
)
|
|
|
|
if "%WITH_ASAN%"=="1" (
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
|
|
)
|
|
|
|
if NOT "%verbose%" == "" (
|
|
echo BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
|
|
)
|
|
|
|
if NOT EXIST %BUILD_DIR%\nul (
|
|
mkdir %BUILD_DIR%
|
|
)
|
|
|
|
if "%MUST_CLEAN%"=="1" (
|
|
echo Cleaning %BUILD_DIR%
|
|
cd %BUILD_DIR%
|
|
"%CMAKE%" --build . --config Clean
|
|
)
|
|
|
|
if NOT EXIST %BUILD_DIR%\build.ninja set MUST_CONFIGURE=1
|
|
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
|
|
|
if "%MUST_CONFIGURE%"=="1" (
|
|
"%CMAKE%" ^
|
|
%BUILD_CMAKE_ARGS% ^
|
|
-H%BLENDER_DIR% ^
|
|
-B%BUILD_DIR%
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo "Configuration Failed"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
echo echo off > %BUILD_DIR%\rebuild.cmd
|
|
echo if "%%VSCMD_VER%%" == "" ^( >> %BUILD_DIR%\rebuild.cmd
|
|
echo call "%VCVARS%" %BUILD_ARCH% >> %BUILD_DIR%\rebuild.cmd
|
|
echo ^) >> %BUILD_DIR%\rebuild.cmd
|
|
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
|
echo ninja install %%* >> %BUILD_DIR%\rebuild.cmd
|
|
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd |