# Configure path to linker and emulators to use when running unit tests
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
runner = "qemu-arm-static"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
runner = "qemu-aarch64-static"
[target.riscv64gc-unknown-linux-gnu]
linker = "riscv64-linux-gnu-gcc"
runner = "qemu-riscv64-static"
[target.x86_64-pc-windows-gnu]
runner = "wine64"

# Provide path to the pkg-config wrapper for each supported platform
[env]
PKG_CONFIG_x86_64-unknown-linux-gnu = "x86_64-linux-gnu-pkg-config"
PKG_CONFIG_aarch64-unknown-linux-gnu = "aarch64-linux-gnu-pkg-config"
PKG_CONFIG_armv7_unknown_linux_gnueabihf = "arm-linux-gnueabihf-pkg-config"

# riscv does not have a pkg-config wrapper, so we need to configure it manually.
# See https://autotools.info/pkgconfig/cross-compiling.html for details.
PKG_CONFIG_PATH_riscv64gc_unknown_linux_gnu = ""
PKG_CONFIG_LIBDIR_riscv64gc_unknown_linux_gnu = "/usr/lib/riscv64-linux-gnu/pkgconfig"
PKG_CONFIG_SYSROOT_DIR_riscv64gc_unknown_linux_gnu = "/usr/lib/riscv64-linux-gnu"

# libslirp is currently not properly configured via pkg-config and cannot use the wrapper like
# other architextures do.
# TODO(b/266100489): Add a libslirp.pc file and use the pkg-config wrapper
PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu = "/usr/x86_64-w64-mingw32"
