Build: Add WITH_OPTIMIZED_BUILD_TOOLS

Enable optimizations on Debug builds for executables used for the build
process (datatoc and glsl_preprocess) and enable unity builds for
shader preprocessing targets.

Debug: From 28.9s to 5.7s
Release: From 4.9s to 3.5s

Pull Request: https://projects.blender.org/blender/blender/pulls/138274
This commit is contained in:
Miguel Pozo
2025-05-02 18:33:44 +02:00
parent 37dcdb2b6a
commit f24ad7a470
7 changed files with 24 additions and 0 deletions

View File

@@ -302,6 +302,12 @@ Use pre-compiled headers to speed up compilation."
endif()
endif()
option(WITH_OPTIMIZED_BUILD_TOOLS "\
Enable optimizations even on Debug builds for executables used for the build process"
ON
)
mark_as_advanced(WITH_OPTIMIZED_BUILD_TOOLS)
option(WITH_IK_ITASC "\
Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)"
ON
@@ -2757,6 +2763,7 @@ if(FIRST_RUN)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)
info_cfg_option(WITH_OPTIMIZED_BUILD_TOOLS)
info_cfg_text("System Options:")
info_cfg_option(WITH_INSTALL_PORTABLE)