diff --git a/build-aux/many-builds.py b/build-aux/many-builds.py index 9b72d979c6c8c58adf8900b0dd9f6842253b9dac..abbd5449a9c8d61ca58726a171414cf9377fc75d 100755 --- a/build-aux/many-builds.py +++ b/build-aux/many-builds.py @@ -53,6 +53,8 @@ _build/ coverage/ Build for host system with coverage doc/ Build for host system with gtk-doc and pandoc host-no-asan/ No AddressSanitizer, for use with valgrind + arm64/ Build for host system for arm64, as an + example of a non-x86 platform i386/ Build for host system for i386 """ @@ -298,6 +300,17 @@ class Environment: ] + args, ) + self.setup_one( + 'arm64', + dev_build + [ + '-Dintrospection=disabled', + '-Dmultiarch_tuple=aarch64-linux-gnu', + '--cross-file=build-aux/meson/arm64.txt', + ] + args, + # Host system doesn't necessarily have an arm64 toolchain + check=False, + ) + self.setup_one( 'i386', asan_dev_build + [ diff --git a/build-aux/meson/arm64.txt b/build-aux/meson/arm64.txt new file mode 100644 index 0000000000000000000000000000000000000000..afa1aed2ff05125f906151619a4f9285a122112c --- /dev/null +++ b/build-aux/meson/arm64.txt @@ -0,0 +1,41 @@ +# Copyright 2022-2025 Collabora Ltd. +# SPDX-License-Identifier: MIT +# +# Loosely based on the output of: +# /usr/share/meson/debcrossgen --arch arm64 + +[constants] +DEB_HOST_GNU_TYPE = 'aarch64-linux-gnu' +DEB_HOST_MULTIARCH = 'aarch64-linux-gnu' + +[binaries] +c = DEB_HOST_GNU_TYPE + '-gcc' +cpp = DEB_HOST_GNU_TYPE + '-g++' +ar = DEB_HOST_GNU_TYPE + '-ar' +strip = DEB_HOST_GNU_TYPE + '-strip' +objcopy = DEB_HOST_GNU_TYPE + '-objcopy' +ld = DEB_HOST_GNU_TYPE + '-ld' +pkgconfig = DEB_HOST_GNU_TYPE + '-pkg-config' +pkg-config = DEB_HOST_GNU_TYPE + '-pkg-config' +cmake = 'cmake' +cups-config = 'cups-config' +sdl2-config = 'sdl2-config' + +[built-in options] +libdir = 'lib' / DEB_HOST_MULTIARCH + +[properties] +# This assumes that if we will run tests, we have qemu-static installed +needs_exe_wrapper = false + +[cmake] +CMAKE_C_COMPILER = DEB_HOST_GNU_TYPE + '-gcc' +CMAKE_CXX_COMPILER = DEB_HOST_GNU_TYPE + '-g++' +CMAKE_SYSTEM_NAME = 'Linux' +CMAKE_SYSTEM_PROCESSOR = 'aarch64' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'arm64' +endian = 'little'