# Meson native file for compiling under Homebrew for arm64 architecture

[binaries]
cpp = '/opt/homebrew/bin/g++-15'
c = '/opt/homebrew/bin/gcc-15'
flex = '/opt/homebrew/opt/flex/bin/flex'
bison = '/opt/homebrew/opt/bison/bin/bison'

[built-in options]
# The '-D_Static_assert=static_assert' flag works around a bug in the macOS 26
# SDK shipped with Xcode/CLT 26.4, where <mach/message.h> uses the C11 keyword
# _Static_assert in code that is also compiled as C++. Clang accepts this as an
# extension, but GCC does not. See the macOS troubleshooting section of the
# README and https://github.com/orgs/Homebrew/discussions/6778
cpp_args = [ '-I/opt/homebrew/include', '-B', '/opt/homebrew/lib', '-D_Static_assert=static_assert' ]
# XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282, workaround is to use ld_classic
cpp_link_args = [ '-Wl,-ld_classic' ]
c_link_args = [ '-Wl,-ld_classic' ]
fortran_link_args = [ '-Wl,-ld_classic' ]
#fortran_args = [ '-B', '/Users/sebastien/slicot' ]