How to increase NDK compiling speed

I have found a way to increase compiling speed of Android NDK. This will work with any versions and any platforms

Since NDK is using make, we can simply add a -j(Number) flag. Go to the (SDK Location)\ndk(NDK version)\build and edit the ndk-build.cmd (Windows) or ndk-build.sh (Linux/macOS) with any text editor of your choice. In this case, i’m using Windows

add the -j(Number) switch beside the path to make executeable. If you are unsure what number, just put 2. I recommended to use a half number of your CPU core like, if you have 8 cores of CPU, use 4. If your CPU usage is too high, reduce the number

"%PREBUILT_PATH%\bin\make.exe" -j4 -O -f "%NDK_ROOT%\build\core\build-local.mk" SHELL=cmd %*

1639169755328.png

Comments

Popular Posts

VMOS Pro Global CN FREE Custom ROMs | Gapps, ROOT, Xposed | Android 4.4.4, 5.1.1, 7.1.2, 9.0 ROMs | NO VIP

How to activate VMOS Assistant to run VMOS on Android 12 and above