Host Setup on Windows
Extract, load, and verify the SPECS NDK on a Windows 10+ x86_64 build host, and see why it bundles llvm-mingw Clang.
This page applies only to Windows 10+ x86_64 hosts. macOS users see Host Setup on macOS.
Extract the SDK on Windows
Get the Windows tarball, specsndk-armv8-1.3.0-mingw32-x86_64.tar, from the Downloads page. Then pick an install location. Windows hosts have no relocation step: the toolchain works in place after extraction (PE/COFF binaries resolve DLL paths relative to the executable, and the CMake toolchain files resolve paths relative to themselves).
The tarball is XZ-compressed despite the .tar extension. Windows 10 (build 17063 or later) ships tar.exe and curl.exe in System32, so you can extract directly from cmd.exe or PowerShell:
:: Open an elevated cmd if installing under Program Files; otherwise any cmd window is fine.
mkdir C:\specsndk
tar -xJf specsndk-armv8-1.3.0-mingw32-x86_64.tar -C C:\specsndk
PowerShell equivalent:
New-Item -ItemType Directory -Force C:\specsndk
tar -xJf specsndk-armv8-1.3.0-mingw32-x86_64.tar -C C:\specsndk
Avoid paths with spaces (for example C:\Program Files\…) for the install root: many third-party build scripts break on spaces in toolchain paths. C:\specsndk or %USERPROFILE%\specsndk are safe choices.
The SDK contains symlinks (for example versioned shared-object aliases inside sysroots/armv8a-snap-linux/usr/lib/). The Windows tar.exe extracts these as regular file copies, which is harmless because those files are never executed on the host; they are only read at cross-link time. The host-tools tree itself (sysroots/x86_64-w64-mingw32/) is pure PE32+ executables and DLLs, no symlinks required.
No relocation step needed on Windows
No relocation step is required on Windows. PE/COFF (Windows' binary format) does not embed an absolute loader path: Windows loads DLLs from the directory containing the EXE and PATH, both resolved at runtime. The CMake toolchain files resolve every path relative to themselves, so the SDK works wherever you put it.
The Windows tarball also contains relocate_sdk.py and post-relocate-setup.sh. You don't need to run them on Windows; ignore them.
Verify the Windows install
:: Host Clang (used by SpecsNDK-Toolchain-Clang.cmake on Windows)
C:\specsndk\sysroots\x86_64-w64-mingw32\usr\lib\llvm-mingw\bin\clang.exe --version
:: Bundled CMake / Ninja
C:\specsndk\sysroots\x86_64-w64-mingw32\usr\bin\cmake.exe --version
C:\specsndk\sysroots\x86_64-w64-mingw32\usr\bin\ninja.exe --version
Each command prints a version banner. If Windows reports is not recognized as an internal or external command, the path you typed does not match where the tarball was extracted; adjust accordingly.
Why the Windows Clang lives under llvm-mingw/
On macOS the Yocto build produces a nativesdk-clang package that lives at sysroots/<HOST>/usr/bin/clang and is built against the same LLVM (18.1.8) as the rest of the SDK. The Yocto meta-clang layer does not support building nativesdk-clang for a mingw32 canadian-cross host (the recipe is stubbed in clang_%.bbappend), so the Windows tarball instead bundles upstream llvm-mingw at sysroots/x86_64-w64-mingw32/usr/lib/llvm-mingw/. The Clang there is version 22, newer than the macOS Clang (18.1.8), but it produces compatible aarch64 ELF binaries because both target the same target sysroot, the same libc++ headers, and the same GCC support libraries.
SpecsNDK-Toolchain-Clang.cmake detects Windows via CMAKE_HOST_WIN32 and selects the llvm-mingw Clang automatically. It also injects two flags that are not needed on macOS:
--gcc-install-dir=<sysroot>/usr/lib/aarch64-snap-linux/13.4.0: upstream Clang cannot auto-detect Yocto's non-standard GCC install layout (libgcc.a and the CRT objects live at<sysroot>/usr/lib/aarch64-snap-linux/<gccver>/rather than<prefix>/lib/gcc/<triple>/<ver>/).-nostdinc++ -cxx-isystem <sysroot>/usr/include/c++/v1: forces the target sysroot's libc++ 1.0 headers so Windows builds see the same C++ standard library as macOS builds. (llvm-mingw ships its own newer libc++ headers that would otherwise win by default; the target ABI is libc++ 1.0.)
After this, the rest of the Get Started pages apply identically to both hosts: write a CMakeLists.txt, pass -DCMAKE_TOOLCHAIN_FILE=…\SpecsNDK-Toolchain-Clang.cmake, and cmake --build. Continue with Build your first Native Lens.