#2407·unicorn

[Feature Request] Improve Windows-native host/target header generation for Android cross-compilation

Author: mrpsoCreated Aug 29, 2026Updated Aug 29, 2026

Is your feature request related to a problem? Please describe.

Currently, cross-compiling Unicorn for Android on a Windows host requires generating runtime configuration headers (config-host.h and config-target.h).

While the majority of the build pipeline and C/C++ compilation can be seamlessly handled by the official Android NDK CMake toolchain, generating these specific host/target header files on Windows without relying on full POSIX/Bash environments (like MSYS2/Cygwin) remains tricky.

Describe the solution you'd like

Would the maintainers consider providing or updating a Windows-native generation solution for config-host.h and config-target.h?

Specifically:

  • Header Generation: Provide a Windows-friendly script (e.g., PowerShell .ps1 or native Python script) to generate config-host.h and config-target.h without needing POSIX sh / shell-based configure.
  • NDK Integration: Allow the rest of the compilation process to fully rely on the standard Android NDK CMake workflow (android.toolchain.cmake).

Describe alternatives you've considered

  1. Using MSYS2/MinGW Bash to run ./configure on Windows, which adds external dependencies and friction for pure Windows-based CI/CD or CMake workflows.
  2. Manually crafting or hardcoding config-host.h for Android target architectures.

Additional context

This improvement would streamline the build workflow for developers who build Android native binaries directly on Windows developer environments or Windows-based CI pipelines.