Skip to content

Build and Development

Harshal Sawant edited this page Feb 5, 2026 · 1 revision

Requirements

  • Android NDK r26 or newer recommended
  • CMake 3.18 or newer
  • Ninja optional

Build All ABIs

export ANDROID_NDK=/path/to/android-ndk
./build.sh all

Build One ABI

export ANDROID_NDK=/path/to/android-ndk
./build.sh arm64-v8a

Clean

./build.sh clean

Output Locations

  • build/<ABI>/bin/task_optimizer
  • bin/<ABI>/task_optimizer

CMake Options

  • CTO_ENABLE_WARNINGS default ON
  • CTO_ENABLE_LTO default ON
  • CTO_ENABLE_STRIP default ON for Android Release builds

To pass options manually:

cmake -S . -B build/arm64-v8a \
  -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake" \
  -DANDROID_ABI=arm64-v8a \
  -DANDROID_PLATFORM=android-21 \
  -DCMAKE_BUILD_TYPE=Release \
  -DCTO_ENABLE_LTO=ON

Clone this wiki locally