[Bf-blender-cvs] [2a891842afa] master: Clang-format: Speed up detection of clang-format
Sergey Sharybin
noreply at git.blender.org
Tue Apr 16 17:10:44 CEST 2019
Commit: 2a891842afabcbb903897cfd56f7389f02d7e3b4
Author: Sergey Sharybin
Date: Tue Apr 16 17:05:31 2019 +0200
Branches: master
https://developer.blender.org/rB2a891842afabcbb903897cfd56f7389f02d7e3b4
Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
===================================================================
M build_files/windows/format.cmd
M make.bat
===================================================================
diff --git a/build_files/windows/format.cmd b/build_files/windows/format.cmd
index 820263507fe..ca5330dc37c 100644
--- a/build_files/windows/format.cmd
+++ b/build_files/windows/format.cmd
@@ -1,9 +1,24 @@
+if EXIST %BLENDER_DIR%\..\lib\win64_vc14\llvm\bin\clang-format.exe (
+ set CF_PATH=..\lib\win64_vc14\llvm\bin
+ goto detect_done
+)
+if EXIST %BLENDER_DIR%\..\lib\windows_vc14\llvm\bin\clang-format.exe (
+ set CF_PATH=..\lib\windows_vc14\llvm\bin
+ goto detect_done
+)
+
+echo clang-format not found
+exit /b 1
+
+:detect_done
+echo found clang-format in %CF_PATH%
+
REM TODO(sergey): Switch to Python from libraries when available.
set PYTHON="python.exe"
set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
REM The formatting script expects clang-format to be in the current PATH.
-set PATH=%BUILD_VS_LIBDIR%\llvm\bin;%PATH%
+set PATH=%CF_PATH%;%PATH%
%PYTHON% %FORMAT_PATHS% --expand-tabs
diff --git a/make.bat b/make.bat
index 4245071870c..17f9741cf89 100644
--- a/make.bat
+++ b/make.bat
@@ -31,6 +31,12 @@ if "%BUILD_UPDATE%" == "1" (
goto EOF
)
+
+if "%FORMAT%" == "1" (
+ call "%BLENDER_DIR%\build_files\windows\format.cmd"
+ goto EOF
+)
+
call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
if "%BUILD_VS_YEAR%" == "" (
@@ -47,18 +53,13 @@ if "%BUILD_VS_YEAR%" == "" (
)
)
-call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
-if errorlevel 1 goto EOF
-
-if "%FORMAT%" == "1" (
- call "%BLENDER_DIR%\build_files\windows\format.cmd"
- goto EOF
-)
-
call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
+call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
+if errorlevel 1 goto EOF
+
call "%BLENDER_DIR%\build_files\windows\check_submodules.cmd"
if errorlevel 1 goto EOF
More information about the Bf-blender-cvs
mailing list