name: native-build description: Build the native port (x86_64 Linux, Clang). Targets include dc3-native, milo-viewer, render-test, milo-tests, milo2gltf. Use when verifying native compilation or running native tests. argument-hint: "[target] (default: all)" allowed-tools: Bash(cmake *), Bash(ninja *), Read, Grep, Glob
Native Build Skill
Build the native x86_64 Linux port of the DC3 decomp.
Arguments
$ARGUMENTS
Build Directory
The native build uses CMake + Ninja with Clang:
- Source:
/home/free/code/milohax/dc3-decomp/native/ - Build dir:
/home/free/code/milohax/dc3-decomp/native/build/ - Generator: Ninja
Steps
Parse arguments. The argument is an optional target name. If empty, build all targets.
Available targets:
dc3-native— main engine executablemilo-viewer— .milo file viewerrender-test— rendering testsmilo-tests— unit testsmilo2gltf— milo-to-gltf convertermilo-tex-export— texture exportermilo-mat-export— material exporterwgpu-window-test— WebGPU window test- (no target /
all) — builds everything
If build dir doesn't exist, configure first:
cmake -S /home/free/code/milohax/dc3-decomp/native -B /home/free/code/milohax/dc3-decomp/native/build -G NinjaBuild the target:
cmake --build /home/free/code/milohax/dc3-decomp/native/build --target TARGET -- -j$(nproc)Or for all targets:
cmake --build /home/free/code/milohax/dc3-decomp/native/build -- -j$(nproc)If build fails, show the first error with context. Common issues:
- Missing
#ifdef HX_NATIVEguards for PPC-specific code - STL API differences between MSVC PPC and modern Clang
- Missing stub implementations in
engine_stubs_generated.cpp - Sandbox blocking Vulkan/GPU access — use
dangerouslyDisableSandbox: true
- Missing
Run tests (if target is
milo-tests):cd /home/free/code/milohax/dc3-decomp/native/build && ctest --output-on-failure
Tips
- The native build uses Clang with MSVC compatibility flags (
-fms-extensions,-fms-compatibility) HX_NATIVEis defined for native builds — use#ifdef HX_NATIVEfor platform-specific code- Functions only in PPC .obj files won't link in native — add source implementations or stubs
- GPU rendering requires
dangerouslyDisableSandbox: truedue to Vulkan ICD access