I’m pleased to announce that we’ve started to ship support for incremental builds in the latest patch releases. I wanted to take a few minutes here to mention how incremental builds will work, what they can handle now, and what is coming in the future. Our plan is to make improvements to incremental builds available in patch releases as we have them ready, so the feature is not complete yet, but should provide some benefit.
Goal:
Our goal with incremental builds it to improve the long time required to build most projects with IL2CPP.
Availability:
We’re shipping incremental build support in patch releases 5.2.2p3 and 4.6.9p2. Initially, incremental builds will work only with iOS. but we plan to make the feature available soon or other platforms that use IL2CPP, including WebGL, Android, XboxOne, and PS4. We’ve chosen iOS initially, as we can depend on Xcode to only build the changed generated C++ source files.
How to use it:
After selecting “Build” from the “Build Settings” dialog, choose the “Append” option for an incremental build. The “Replace” option will perform a clean build.
How it works:
Our focus in implementing this feature has been on making the C++ code generated by il2cpp.exe more stable. That is, a small change in the input IL code should correspond to a small change in the generated C++ code. For this initial release, we’ve implemented generated code stability across a few changes.
- Assembly dependency order - for example, a change to Assembly-CSharp.dll should not impact any code generated for mscorlib.dll (unless stripping is involved, see below).
- String literal addition, removal, and changes
- Non-generic Type addition, removal and changes
On our roadmap, we’re planning to improve code stability with the following upcoming changes:
- Prevent stripping from impacting type and method names in generated code.
- Generate stable type and method indices for runtime metadata retrieval.
- Improve code stability for generic types.
You should expect to see these improvements in upcoming patch releases. Of course, the C++ compile step is only a part of the build process. We’re also working to improve code conversion times (IL → C++), but we hope that these changes will improve the IL2CPP build process.
Reporting bugs:
We really appreciate bug reports about this feature, as it is can often be difficult to isolate the cause of unnecessary changes to generated code. We can make the most progress on fixing incremental build issues if a bug report can provide the IL assemblies and generated C++ code from before and after an incremental build that failed.