# ============================================================================
# Meson Cross-Compilation File for Emscripten (WASM)
# ============================================================================
# This file tells Meson to use clang-tool-chain emscripten wrappers for
# cross-compiling FastLED to WebAssembly.
#
# Usage:
#   meson setup .build/meson-wasm-quick --cross-file ci/meson/wasm_cross_file.ini
#
# The clang-tool-chain wrappers handle:
#   - Emscripten SDK path resolution
#   - Platform detection (Windows/Linux/macOS)
#   - Tool versioning and compatibility
# ============================================================================

[binaries]
c = 'clang-tool-chain-emcc'
cpp = 'clang-tool-chain-emcc'
ar = 'clang-tool-chain-emar'
strip = 'true'
# Note: wasm-ld is invoked by emcc during linking, not directly by meson

[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'

[properties]
# Skip meson's compiler sanity check — emcc sometimes fails the default
# test program due to missing emscripten runtime stubs at configure time.
# The actual compilation validates the toolchain during build.
skip_sanity_check = true

# Emscripten executables need a JS runtime to run
needs_exe_wrapper = true
