xmake-cross-compilation

Installation
SKILL.md

Cross Compilation with Xmake

Cross compilation means producing binaries for a platform that is not the host you are running xmake on. In xmake it boils down to three choices:

  1. Which platform (-p/--plat=) you are targeting.
  2. Which toolchain (SDK + cross prefix + cc/cxx/ld/ar) does the work.
  3. Any extra flags (includes, libs, cflags) needed for the target.

Most of the time, -p <plat> --sdk=<root> is enough — xmake auto-detects the rest. The rest of this skill is the knobs you reach for when auto-detection is not enough.

1. Typical cross-SDK layout

Xmake auto-detects a toolchain SDK that looks like this:

Installs
5
GitHub Stars
16
First Seen
Apr 29, 2026
xmake-cross-compilation — xmake-io/xmake-skills