[ML] Build acceleration with unity builds, PCH, Ninja, and /Z7 debug info#2905
Open
edsavage wants to merge 1 commit intoelastic:mainfrom
Open
[ML] Build acceleration with unity builds, PCH, Ninja, and /Z7 debug info#2905edsavage wants to merge 1 commit intoelastic:mainfrom
edsavage wants to merge 1 commit intoelastic:mainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
231a54d to
01f25ec
Compare
Enable CMake unity builds and precompiled headers (PCH) to reduce compilation times. Use Ninja Multi-Config generator on Windows for faster parallel compilation (downloaded on-demand during CI). Unity builds: - Enabled globally via -DCMAKE_UNITY_BUILD=ON (Windows/Linux) - Disabled on macOS (counterproductive on 4-core Orka VMs) - Disabled for MlApi and MlMathsAnalytics (too many symbol conflicts) - Fix anonymous-namespace conflicts in core/ and maths/ sources PCH: - New ML_PCH option adds Boost headers as precompiled header targets - Enabled via -DML_PCH=ON in CI pipeline environments Ninja on Windows: - Set CMAKE_GENERATOR=Ninja Multi-Config in Windows pipeline env - build.ps1 downloads ninja.exe on-demand from GitHub releases when not already on PATH - Remove /Zi in favour of /Z7 (embedded debug info avoids PDB locking issues with Ninja's parallel compilation) Build system: - build.gradle reads CMAKE_FLAGS from environment, allowing CI to pass unity/PCH flags through to cmake configure - Fix ML_DEBUG handling: use env-dict in pipeline generators (not inline PowerShell commands) and restore debug build directory selection in build/test scripts Made-with: Cursor
01f25ec to
e0c995a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-DML_PCH=ON) for common STL and Boost headers/Ziwith/Z7to eliminatemspdbsrv.exePDB serialization bottlenecklib/core,lib/maths/*,lib/model, andlib/apiTest plan
SKIP_UNITY_BUILD_INCLUSIONor library-level disableboost/unordered_map.hpp)Made with Cursor