#See https://mesonbuild.com/Cross-compilation.html
#and https://mesonbuild.com/Machine-files.html
#and https://mesonbuild.com/Reference-tables.html#cpu-families
#NOTE: This may work with debian as well.
#example usage of this file:
#    meson --buildtype=release --cross-file=./meson_crosscompile/armv7lhf-linux-musleabihf-cross.txt crossbuild_armv7lhfmusl
#    ninja -C crossbuild_armv7lhfmusl

#NOTE: This script requires the musl cross compiler to be installed in /opt/muslcc
#      the install_muslcc.sh script in this same directory will do this for you!


[binaries]
c = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/bin/armv7l-linux-musleabihf-gcc'
ar = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/bin/armv7l-linux-musleabihf-gcc-ar'
strip = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/bin/armv7l-linux-musleabihf-strip'
pkgconfig = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/bin/armv7l-linux-musleabihf-pkg-config'
ld = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/bin/armv7l-linux-musleabihf-ld'

[properties]
root = '/opt/muslcc/armv7l-linux-musleabihf-cross/usr/armv7l-linux-musleabihf'
has_function_printf = true
skip_sanity_check = true

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7'
endian = 'little'

[built-in options]
#since this is the musl cross-compiler, we want to statically link the executable
#This is MIT licensed and compatible to do. It will also make this super portable!
#
default_library='static'
c_link_args='-static'
libc_musl=true
