Overview
Precompiled headers (PCH) let the compiler process Uniwind’s heavy C++ headers once and reuse the result across every translation unit, instead of recompiling them for each file. This cuts native build time with no changes to your code or styles.Precompiled headers are available in Uniwind Pro starting from version
1.5.0 and are enabled by default on both Android and iOS.Performance
PCH gives a solid, real win on both platforms:| Platform | Compilation speedup |
|---|---|
| Android | ~26 - 29% |
| iOS | ~13 - 20% |
Disabling
PCH is on by default, so there is nothing to configure to benefit from it. If you need to turn it off, use the option for your platform.iOS
SetUNIWIND_ENABLE_PCH=0 when installing pods:
Android
The reliable way is to pass the CMake flag from your app’sandroid/app/build.gradle (or the library’s) under externalNativeBuild:
android/app/build.gradle