Merge tag 'rust-ci-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

CI/build-sys fixes for Rust

Collect CI/build-sys patches related to Rust.

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmjb+PUcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5Y3iEAC2C8pc2lPCTGFI+0N/
# eqXwTCeSysbmprhqf3vWXQEke8WgYMGPeZNXqUUnzzRuR5oN7JTy6YNzLCM0jGUp
# QHciTecyPVQjIlWOs+HURqKsrLO2CG1sbWuips1eZ6X8O5KdHLxfFqvyReflEn/z
# G1LHhQEWQzKwR0kj3VVHjyUzeSIJVch8sVONkby4h2DMFO4lHtcrr7VAzKlwKGAt
# kgFgijaLe7xCPktJs7g2x+NfBeRbnQ/3mb3/3pkunx98Dhhis0yTZSyfzlChyVfL
# FwTf/xWgw/0oQ8+c9E/RJz6DVvgjJNASrLumuZWO7HVdDV60cvMwb3xHOcQmAz7t
# +ySKM08jI9lWYIr/tKnwWo1NWFWPzDts0L+M/pRhQ1/pYw8OnYvtwnKd3ClEVRbp
# dYcKRE97t3L8BbWyB5hTvTc0V0IVbOOhfDVZfG/IPqxIKWHeCGLL2PiyKGBgfU2M
# V4okrMbGqWH72HZbLUpMYcaaK9lVv6ng/3AH817giJVnCuNO06m420/7Q8WcX68o
# foIeTbL83h8KCqi8pGCJUW9Wz3/wIk3AYkUKwdISswCL6nSgt7pk7K1fnFwGI4bu
# PqzQITelnRUK0TOvqzbDi6Y3j0p06/bc4TAHoI76Yzi3iUrQL0ynOAFFf6Wk13p9
# EnMAlnsrY9kyJrCMU66lroU/RQ==
# =rMSk
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 30 Sep 2025 08:36:21 AM PDT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [unknown]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'rust-ci-pull-request' of https://gitlab.com/marcandre.lureau/qemu: (23 commits)
  build-sys: pass -fvisibility=default for wasm bindgen
  build-sys: deprecate mips host
  meson: rust-bindgen limit allowlist-file to srcdir/include
  tests/freebsd: enable Rust
  configure: set the meson executable suffix/ext
  tests/lcitool: enable rust & refresh
  tests/docker: add ENABLE_RUST environment
  tests/lcitool: update to debian13
  tests/lcitool: add missing rust-std dep
  lcitool/alpine: workaround bindgen issue
  lcitool/qemu: include libclang-rt for TSAN
  lcitool: update, switch to f41
  build-sys: cfi_debug and safe_stack are not compatible
  tests/docker/common: print meson log on configure failure
  tests/docker: use fully qualified image name for emsdk
  tests/docker/common: print errors to stderr
  configure: set the bindgen cross target
  configure: fix rust meson configuration
  scripts/archive-source: use a bash array
  scripts/archive-source: silence subprojects downloads
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson
2025-09-30 09:29:38 -07:00
44 changed files with 574 additions and 180 deletions
+31 -31
View File
@@ -36,7 +36,7 @@ build-system-ubuntu:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-ubuntu2204-container
- job: amd64-ubuntu2204-container
variables:
IMAGE: ubuntu2204
CONFIGURE_ARGS: --enable-docs
@@ -66,7 +66,7 @@ build-system-debian:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-debian-container
- job: amd64-debian-container
variables:
IMAGE: debian
CONFIGURE_ARGS: --with-coroutine=sigaltstack --enable-rust
@@ -109,7 +109,7 @@ build-system-fedora:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-fedora-container
- job: amd64-fedora-container
variables:
IMAGE: fedora
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs --enable-crypto-afalg --enable-rust
@@ -122,7 +122,7 @@ build-system-fedora-rust-nightly:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-fedora-rust-nightly-container
- job: amd64-fedora-rust-nightly-container
variables:
IMAGE: fedora-rust-nightly
CONFIGURE_ARGS: --disable-docs --enable-rust --enable-strict-rust-lints
@@ -167,7 +167,7 @@ build-system-centos:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-centos9-container
- job: amd64-centos9-container
variables:
IMAGE: centos9
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
@@ -189,7 +189,7 @@ build-previous-qemu:
- build-previous/tests/qtest/migration-test
- build-previous/scripts
needs:
job: amd64-opensuse-leap-container
- job: amd64-opensuse-leap-container
variables:
IMAGE: opensuse-leap
TARGETS: x86_64-softmmu aarch64-softmmu
@@ -274,7 +274,7 @@ build-system-opensuse:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-opensuse-leap-container
- job: amd64-opensuse-leap-container
variables:
IMAGE: opensuse-leap
TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
@@ -308,7 +308,7 @@ build-system-flaky:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-debian-container
- job: amd64-debian-container
variables:
IMAGE: debian
QEMU_JOB_OPTIONAL: 1
@@ -338,7 +338,7 @@ functional-system-flaky:
build-tcg-disabled:
extends: .native_build_job_template
needs:
job: amd64-centos9-container
- job: amd64-centos9-container
variables:
IMAGE: centos9
script:
@@ -364,7 +364,7 @@ build-tcg-disabled:
build-user:
extends: .native_build_job_template
needs:
job: amd64-debian-user-cross-container
- job: amd64-debian-user-cross-container
variables:
IMAGE: debian-all-test-cross
CONFIGURE_ARGS: --disable-tools --disable-system
@@ -374,7 +374,7 @@ build-user:
build-user-static:
extends: .native_build_job_template
needs:
job: amd64-debian-user-cross-container
- job: amd64-debian-user-cross-container
variables:
IMAGE: debian-all-test-cross
CONFIGURE_ARGS: --disable-tools --disable-system --static
@@ -385,7 +385,7 @@ build-user-static:
build-legacy:
extends: .native_build_job_template
needs:
job: amd64-debian-legacy-cross-container
- job: amd64-debian-legacy-cross-container
variables:
IMAGE: debian-legacy-test-cross
TARGETS: alpha-linux-user alpha-softmmu sh4-linux-user
@@ -395,7 +395,7 @@ build-legacy:
build-user-hexagon:
extends: .native_build_job_template
needs:
job: hexagon-cross-container
- job: hexagon-cross-container
variables:
IMAGE: debian-hexagon-cross
TARGETS: hexagon-linux-user
@@ -408,7 +408,7 @@ build-user-hexagon:
build-some-softmmu:
extends: .native_build_job_template
needs:
job: amd64-debian-user-cross-container
- job: amd64-debian-user-cross-container
variables:
IMAGE: debian-all-test-cross
CONFIGURE_ARGS: --disable-tools --enable-debug
@@ -419,7 +419,7 @@ build-some-softmmu:
build-loongarch64:
extends: .native_build_job_template
needs:
job: loongarch-debian-cross-container
- job: loongarch-debian-cross-container
variables:
IMAGE: debian-loongarch-cross
CONFIGURE_ARGS: --disable-tools --enable-debug
@@ -430,7 +430,7 @@ build-loongarch64:
build-tricore-softmmu:
extends: .native_build_job_template
needs:
job: tricore-debian-cross-container
- job: tricore-debian-cross-container
variables:
IMAGE: debian-tricore-cross
CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
@@ -440,7 +440,7 @@ build-tricore-softmmu:
clang-system:
extends: .native_build_job_template
needs:
job: amd64-fedora-container
- job: amd64-fedora-container
variables:
IMAGE: fedora
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-ubsan
@@ -451,7 +451,7 @@ clang-system:
clang-user:
extends: .native_build_job_template
needs:
job: amd64-debian-user-cross-container
- job: amd64-debian-user-cross-container
timeout: 70m
variables:
IMAGE: debian-all-test-cross
@@ -479,7 +479,7 @@ build-cfi-aarch64:
LD_JOBS: 1
AR: llvm-ar
IMAGE: fedora
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
--enable-safe-stack --disable-slirp
TARGETS: aarch64-softmmu
MAKE_CHECK_ARGS: check-build
@@ -517,7 +517,7 @@ build-cfi-ppc64-s390x:
LD_JOBS: 1
AR: llvm-ar
IMAGE: fedora
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
--enable-safe-stack --disable-slirp
TARGETS: ppc64-softmmu s390x-softmmu
MAKE_CHECK_ARGS: check-build
@@ -555,7 +555,7 @@ build-cfi-x86_64:
LD_JOBS: 1
AR: llvm-ar
IMAGE: fedora
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
--enable-safe-stack --disable-slirp
TARGETS: x86_64-softmmu
MAKE_CHECK_ARGS: check-build
@@ -582,7 +582,7 @@ functional-cfi-x86_64:
tsan-build:
extends: .native_build_job_template
needs:
job: amd64-ubuntu2204-container
- job: amd64-ubuntu2204-container
variables:
IMAGE: ubuntu2204
CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
@@ -596,7 +596,7 @@ tsan-build:
gcov:
extends: .native_build_job_template
needs:
job: amd64-ubuntu2204-container
- job: amd64-ubuntu2204-container
timeout: 80m
variables:
IMAGE: ubuntu2204
@@ -623,7 +623,7 @@ gcov:
build-oss-fuzz:
extends: .native_build_job_template
needs:
job: amd64-fedora-container
- job: amd64-fedora-container
variables:
IMAGE: fedora
script:
@@ -645,7 +645,7 @@ build-oss-fuzz:
build-tci:
extends: .native_build_job_template
needs:
job: amd64-debian-user-cross-container
- job: amd64-debian-user-cross-container
variables:
IMAGE: debian-all-test-cross
script:
@@ -670,7 +670,7 @@ build-tci:
build-without-defaults:
extends: .native_build_job_template
needs:
job: amd64-centos9-container
- job: amd64-centos9-container
variables:
IMAGE: centos9
CONFIGURE_ARGS:
@@ -688,7 +688,7 @@ build-libvhost-user:
stage: build
image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
needs:
job: amd64-fedora-container
- job: amd64-fedora-container
script:
- mkdir subprojects/libvhost-user/build
- cd subprojects/libvhost-user/build
@@ -702,9 +702,9 @@ build-tools-and-docs-debian:
- .native_build_job_template
- .native_build_artifact_template
needs:
job: amd64-debian-container
# when running on 'master' we use pre-existing container
optional: true
- job: amd64-debian-container
# when running on 'master' we use pre-existing container
optional: true
variables:
IMAGE: debian
MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
@@ -791,7 +791,7 @@ build-wasm:
extends: .wasm_build_job_template
timeout: 2h
needs:
job: wasm-emsdk-cross-container
- job: wasm-emsdk-cross-container
variables:
IMAGE: emsdk-wasm32-cross
CONFIGURE_ARGS: --static --disable-tools --enable-debug --enable-tcg-interpreter
+1 -1
View File
@@ -42,7 +42,7 @@ x64-freebsd-14-build:
CIRRUS_VM_RAM: 8G
UPDATE_COMMAND: pkg update; pkg upgrade -y
INSTALL_COMMAND: pkg install -y
CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblaze-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4eb-softmmu,xtensa-softmmu
CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblaze-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4eb-softmmu,xtensa-softmmu --enable-rust
TEST_TARGETS: check
aarch64-macos-build:
+23 -23
View File
@@ -4,28 +4,28 @@ include:
cross-armhf-user:
extends: .cross_user_build_job
needs:
job: armhf-debian-cross-container
- job: armhf-debian-cross-container
variables:
IMAGE: debian-armhf-cross
cross-arm64-system:
extends: .cross_system_build_job
needs:
job: arm64-debian-cross-container
- job: arm64-debian-cross-container
variables:
IMAGE: debian-arm64-cross
cross-arm64-user:
extends: .cross_user_build_job
needs:
job: arm64-debian-cross-container
- job: arm64-debian-cross-container
variables:
IMAGE: debian-arm64-cross
cross-arm64-kvm-only:
extends: .cross_accel_build_job
needs:
job: arm64-debian-cross-container
- job: arm64-debian-cross-container
variables:
IMAGE: debian-arm64-cross
EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-features
@@ -35,7 +35,7 @@ cross-i686-system:
- .cross_system_build_job
- .cross_test_artifacts
needs:
job: i686-debian-cross-container
- job: i686-debian-cross-container
variables:
IMAGE: debian-i686-cross
EXTRA_CONFIGURE_OPTS: --disable-kvm
@@ -46,7 +46,7 @@ cross-i686-user:
- .cross_user_build_job
- .cross_test_artifacts
needs:
job: i686-debian-cross-container
- job: i686-debian-cross-container
variables:
IMAGE: debian-i686-cross
MAKE_CHECK_ARGS: check
@@ -57,7 +57,7 @@ cross-i686-tci:
- .cross_test_artifacts
timeout: 60m
needs:
job: i686-debian-cross-container
- job: i686-debian-cross-container
variables:
IMAGE: debian-i686-cross
ACCEL: tcg-interpreter
@@ -71,49 +71,49 @@ cross-i686-tci:
cross-mipsel-system:
extends: .cross_system_build_job
needs:
job: mipsel-debian-cross-container
- job: mipsel-debian-cross-container
variables:
IMAGE: debian-mipsel-cross
cross-mipsel-user:
extends: .cross_user_build_job
needs:
job: mipsel-debian-cross-container
- job: mipsel-debian-cross-container
variables:
IMAGE: debian-mipsel-cross
cross-mips64el-system:
extends: .cross_system_build_job
needs:
job: mips64el-debian-cross-container
- job: mips64el-debian-cross-container
variables:
IMAGE: debian-mips64el-cross
cross-mips64el-user:
extends: .cross_user_build_job
needs:
job: mips64el-debian-cross-container
- job: mips64el-debian-cross-container
variables:
IMAGE: debian-mips64el-cross
cross-ppc64el-system:
extends: .cross_system_build_job
needs:
job: ppc64el-debian-cross-container
- job: ppc64el-debian-cross-container
variables:
IMAGE: debian-ppc64el-cross
cross-ppc64el-user:
extends: .cross_user_build_job
needs:
job: ppc64el-debian-cross-container
- job: ppc64el-debian-cross-container
variables:
IMAGE: debian-ppc64el-cross
cross-ppc64el-kvm-only:
extends: .cross_accel_build_job
needs:
job: ppc64el-debian-cross-container
- job: ppc64el-debian-cross-container
variables:
IMAGE: debian-ppc64el-cross
EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-devices
@@ -121,35 +121,35 @@ cross-ppc64el-kvm-only:
cross-riscv64-system:
extends: .cross_system_build_job
needs:
job: riscv64-debian-cross-container
- job: riscv64-debian-cross-container
variables:
IMAGE: debian-riscv64-cross
cross-riscv64-user:
extends: .cross_user_build_job
needs:
job: riscv64-debian-cross-container
- job: riscv64-debian-cross-container
variables:
IMAGE: debian-riscv64-cross
cross-s390x-system:
extends: .cross_system_build_job
needs:
job: s390x-debian-cross-container
- job: s390x-debian-cross-container
variables:
IMAGE: debian-s390x-cross
cross-s390x-user:
extends: .cross_user_build_job
needs:
job: s390x-debian-cross-container
- job: s390x-debian-cross-container
variables:
IMAGE: debian-s390x-cross
cross-s390x-kvm-only:
extends: .cross_accel_build_job
needs:
job: s390x-debian-cross-container
- job: s390x-debian-cross-container
variables:
IMAGE: debian-s390x-cross
EXTRA_CONFIGURE_OPTS: --disable-tcg --enable-trace-backends=ftrace
@@ -157,7 +157,7 @@ cross-s390x-kvm-only:
cross-mips64el-kvm-only:
extends: .cross_accel_build_job
needs:
job: mips64el-debian-cross-container
- job: mips64el-debian-cross-container
variables:
IMAGE: debian-mips64el-cross
EXTRA_CONFIGURE_OPTS: --disable-tcg --target-list=mips64el-softmmu
@@ -165,7 +165,7 @@ cross-mips64el-kvm-only:
cross-win64-system:
extends: .cross_system_build_job
needs:
job: win64-fedora-cross-container
- job: win64-fedora-cross-container
variables:
IMAGE: fedora-win64-cross
EXTRA_CONFIGURE_OPTS: --enable-fdt=internal --disable-plugins
@@ -181,7 +181,7 @@ cross-win64-system:
cross-amd64-xen-only:
extends: .cross_accel_build_job
needs:
job: amd64-debian-cross-container
- job: amd64-debian-cross-container
variables:
IMAGE: debian-amd64-cross
ACCEL: xen
@@ -190,7 +190,7 @@ cross-amd64-xen-only:
cross-arm64-xen-only:
extends: .cross_accel_build_job
needs:
job: arm64-debian-cross-container
- job: arm64-debian-cross-container
variables:
IMAGE: debian-arm64-cross
ACCEL: xen
+3 -3
View File
@@ -32,7 +32,7 @@ check-python-minreqs:
variables:
GIT_DEPTH: 1
needs:
job: python-container
- job: python-container
check-python-tox:
extends: .base_job_template
@@ -45,7 +45,7 @@ check-python-tox:
QEMU_TOX_EXTRA_ARGS: --skip-missing-interpreters=false
QEMU_JOB_OPTIONAL: 1
needs:
job: python-container
- job: python-container
check-rust-tools-nightly:
extends: .base_job_template
@@ -76,7 +76,7 @@ check-build-units:
stage: build
image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
needs:
job: amd64-debian-container
- job: amd64-debian-container
before_script:
- source scripts/ci/gitlab-ci-section
- section_start setup "Install Tools"
Vendored
+21 -2
View File
@@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
# We ignore PATH completely here: we want to use the venv's Meson
# *exclusively*.
meson="$(cd pyvenv/bin; pwd)/meson"
# for msys2
get_pwd() {
if pwd -W >/dev/null 2>&1; then
pwd -W
else
pwd
fi
}
meson="$(cd pyvenv/bin; get_pwd)/meson"
if [ -f "$meson$EXESUF" ]; then
meson="$meson$EXESUF"
fi
# Conditionally ensure Sphinx is installed.
@@ -1878,6 +1890,13 @@ if test "$skip_meson" = no; then
eval "c=\$devices_${a}"
echo "${a}-softmmu = '$c'" >> $cross
done
if test "$rust" != disabled; then
if test "$cross_compile" = "yes"; then
. "$source_path/scripts/rust-to-clang-target.sh"
clang_target=$(rust_to_clang_target "$rust_target_triple")
echo "bindgen_clang_arguments = [$(meson_quote --target="$clang_target")]" >> $cross
fi
fi
echo "[built-in options]" >> $cross
echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
@@ -1958,7 +1977,7 @@ if test "$skip_meson" = no; then
echo "[binaries]" >> $native
echo "c = [$(meson_quote $host_cc)]" >> $native
if test "$rust" != disabled; then
echo "rust = [$(meson_quote $rustc)]" >> $cross
echo "rust = [$(meson_quote $rustc)]" >> $native
fi
mv $native config-meson.native
meson_option_add --native-file
-2
View File
@@ -44,8 +44,6 @@ Those hosts are officially supported, with various accelerators:
- Accelerators
* - Arm
- hvf (64 bit only), kvm (64 bit only), tcg, xen
* - MIPS (64 bit little endian only)
- kvm, tcg
* - PPC
- kvm, tcg
* - RISC-V
+3 -6
View File
@@ -172,8 +172,8 @@ This argument has always been ignored.
Host Architectures
------------------
Big endian MIPS since 7.2; 32-bit little endian MIPS since 9.2
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Big endian MIPS since 7.2; 32-bit little endian MIPS since 9.2, MIPS since 11.0
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
As Debian 10 ("Buster") moved into LTS the big endian 32 bit version of
MIPS moved out of support making it hard to maintain our
@@ -181,10 +181,7 @@ cross-compilation CI tests of the architecture. As we no longer have
CI coverage support may bitrot away before the deprecation process
completes.
Likewise, the little endian variant of 32 bit MIPS is not supported by
Debian 13 ("Trixie") and newer.
64 bit little endian MIPS is still a supported host architecture.
Likewise, MIPS is not supported by Debian 13 ("Trixie") and newer.
System emulation on 32-bit x86 hosts (since 8.0)
''''''''''''''''''''''''''''''''''''''''''''''''
+25 -9
View File
@@ -681,6 +681,9 @@ if get_option('cfi')
error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler')
endif
if get_option('cfi_debug')
if get_option('safe_stack')
error('cfi_debug is not compatible with safe_stack')
endif
if cc.compiles('int main () { return 0; }',
name: '-fno-sanitize-trap=cfi-icall',
args: ['-flto', '-fsanitize=cfi-icall',
@@ -1350,7 +1353,13 @@ if get_option('spice') \
endif
spice_headers = spice.partial_dependency(compile_args: true, includes: true)
rt = cc.find_library('rt', required: false)
rt = not_found
if host_os != 'windows'
have_shm_open = cc.has_function('shm_open')
if not have_shm_open
rt = cc.find_library('rt', required: true)
endif
endif
libiscsi = not_found
if not get_option('libiscsi').auto() or have_block
@@ -3812,14 +3821,10 @@ util_ss = util_ss.apply({})
libqemuutil = static_library('qemuutil',
build_by_default: false,
sources: util_ss.sources() + stub_ss.sources() + genh,
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc])
qemuutil_deps = [event_loop_base]
if host_os != 'windows'
qemuutil_deps += [rt]
endif
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, rt])
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res,
dependencies: qemuutil_deps)
dependencies: [event_loop_base])
if have_system or have_user
decodetree = generator(find_program('scripts/decodetree.py'),
@@ -4233,8 +4238,7 @@ if have_rust
'--no-layout-tests',
'--no-prepend-enum-name',
'--allowlist-file', meson.project_source_root() + '/include/.*',
'--allowlist-file', meson.project_source_root() + '/.*',
'--allowlist-file', meson.project_build_root() + '/.*'
'--allowlist-file', meson.project_build_root() + '/.*',
]
if not rustfmt.found()
if bindgen.version().version_compare('<0.65.0')
@@ -4252,6 +4256,10 @@ if have_rust
else
bindgen_args_common += ['--merge-extern-blocks']
endif
bindgen_c_args = []
if host_arch == 'wasm32'
bindgen_c_args += ['-fvisibility=default']
endif
subdir('rust')
endif
@@ -5036,6 +5044,14 @@ elif host_long_bits < 64
message()
message('Support for 32-bit CPU host architecture ' + cpu + ' is going')
message('to be dropped in a future QEMU release.')
elif host_arch == 'mips'
message()
warning('DEPRECATED HOST CPU')
message()
message('Support for CPU host architecture ' + cpu + ' is going to be')
message('dropped as soon as the QEMU project stops supporting Debian 12')
message('("Bookworm"). Going forward, the QEMU project will not guarantee')
message('that QEMU will compile or work on this host CPU.')
endif
if not supported_oses.contains(host_os)
+1
View File
@@ -21,6 +21,7 @@ _bql_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common,
c_args: bindgen_c_args,
)
_bql_rs = static_library(
+1
View File
@@ -20,6 +20,7 @@ _chardev_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common + _chardev_bindgen_args,
c_args: bindgen_c_args,
)
_chardev_rs = static_library(
+1
View File
@@ -12,6 +12,7 @@ _libpl011_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common,
c_args: bindgen_c_args,
)
_libpl011_rs = static_library(
+1
View File
@@ -41,6 +41,7 @@ _hwcore_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common + _hwcore_bindgen_args,
c_args: bindgen_c_args,
)
_hwcore_rs = static_library(
+2 -1
View File
@@ -22,7 +22,8 @@ _migration_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common + _migration_bindgen_args,
)
c_args: bindgen_c_args,
)
_migration_rs = static_library(
'migration',
+1
View File
@@ -12,6 +12,7 @@ _qom_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common,
c_args: bindgen_c_args,
)
_qom_rs = static_library(
+1
View File
@@ -20,6 +20,7 @@ _system_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common + _system_bindgen_args,
c_args: bindgen_c_args,
)
_system_rs = static_library(
+1
View File
@@ -22,6 +22,7 @@ _util_bindings_inc_rs = rust.bindgen(
include_directories: bindings_incdir,
bindgen_version: ['>=0.60.0'],
args: bindgen_args_common + _util_bindgen_args,
c_args: bindgen_c_args,
)
_util_rs = static_library(
+25 -9
View File
@@ -26,12 +26,27 @@ sub_file="${sub_tdir}/submodule.tar"
# independent of what the developer currently has initialized
# in their checkout, because the build environment is completely
# different to the host OS.
subprojects="keycodemapdb libvfio-user berkeley-softfloat-3
berkeley-testfloat-3 anyhow-1-rs arbitrary-int-1-rs attrs-0.2-rs bilge-0.2-rs
bilge-impl-0.2-rs either-1-rs foreign-0.3-rs itertools-0.11-rs
libc-0.2-rs proc-macro2-1-rs
proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs
syn-2-rs unicode-ident-1-rs"
subprojects=(
anyhow-1-rs
arbitrary-int-1-rs
attrs-0.2-rs
berkeley-softfloat-3
berkeley-testfloat-3
bilge-0.2-rs
bilge-impl-0.2-rs
either-1-rs
foreign-0.3-rs
itertools-0.11-rs
keycodemapdb
libc-0.2-rs
libvfio-user
proc-macro-error-1-rs
proc-macro-error-attr-1-rs
proc-macro2-1-rs
quote-1-rs
syn-2-rs
unicode-ident-1-rs
)
sub_deinit=""
function cleanup() {
@@ -77,9 +92,10 @@ function subproject_dir() {
git archive --format tar "$(tree_ish)" > "$tar_file"
test $? -ne 0 && error "failed to archive qemu"
for sp in $subprojects; do
meson subprojects download $sp
test $? -ne 0 && error "failed to download subproject $sp"
meson subprojects download ${subprojects[@]} >/dev/null
test $? -ne 0 && error "failed to download subprojects $subprojects"
for sp in "${subprojects[@]}"; do
tar --append --file "$tar_file" --exclude=.git subprojects/"$(subproject_dir $sp)"
test $? -ne 0 && error "failed to append subproject $sp to $tar_file"
done
@@ -36,6 +36,7 @@ packages:
- libcap-ng-dev
- libcapstone-dev
- libcbor-dev
- libclang-dev
- libcmocka-dev
- libcurl4-gnutls-dev
- libdaxctl-dev
@@ -80,6 +81,7 @@ packages:
- libspice-protocol-dev
- libspice-server-dev
- libssh-dev
- libstd-rust-dev
- libsystemd-dev
- libtasn1-6-dev
- libubsan1
@@ -95,7 +97,6 @@ packages:
- llvm
- locales
- make
- meson
- mtools
- multipath-tools
- ncat
@@ -108,10 +109,12 @@ packages:
- python3-opencv
- python3-pillow
- python3-pip
- python3-setuptools
- python3-sphinx
- python3-sphinx-rtd-theme
- python3-tomli
- python3-venv
- python3-wheel
- python3-yaml
- rpm2cpio
- rustc-1.77
@@ -36,6 +36,7 @@ packages:
- libcap-ng-dev
- libcapstone-dev
- libcbor-dev
- libclang-dev
- libcmocka-dev
- libcurl4-gnutls-dev
- libdaxctl-dev
@@ -79,6 +80,7 @@ packages:
- libsndio-dev
- libspice-protocol-dev
- libssh-dev
- libstd-rust-dev
- libsystemd-dev
- libtasn1-6-dev
- libubsan1
@@ -93,7 +95,6 @@ packages:
- llvm
- locales
- make
- meson
- mtools
- multipath-tools
- ncat
@@ -106,10 +107,12 @@ packages:
- python3-opencv
- python3-pillow
- python3-pip
- python3-setuptools
- python3-sphinx
- python3-sphinx-rtd-theme
- python3-tomli
- python3-venv
- python3-wheel
- python3-yaml
- rpm2cpio
- rustc-1.77
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env sh
#
# Copyright (C) 2025 Red Hat, Inc.
#
# Based on rust_to_clang_target() tests from rust-bindgen.
#
# SPDX-License-Identifier: GPL-2.0-or-later
scripts_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "$scripts_dir/rust-to-clang-target.sh"
test_case() {
input="$1"
expected="$2"
result=$(rust_to_clang_target "$input")
if [ "$result" = "$expected" ]; then
echo " OK: '$input' -> '$result'"
else
echo " FAILED: '$input'"
echo " Expected: '$expected'"
echo " Got: '$result'"
exit 1
fi
}
echo "Running tests..."
test_case "aarch64-apple-ios" "arm64-apple-ios"
test_case "riscv64gc-unknown-linux-gnu" "riscv64-unknown-linux-gnu"
test_case "riscv64imac-unknown-none-elf" "riscv64-unknown-none-elf"
test_case "riscv32imc-unknown-none-elf" "riscv32-unknown-none-elf"
test_case "riscv32imac-unknown-none-elf" "riscv32-unknown-none-elf"
test_case "riscv32imafc-unknown-none-elf" "riscv32-unknown-none-elf"
test_case "riscv32i-unknown-none-elf" "riscv32-unknown-none-elf"
test_case "riscv32imc-esp-espidf" "riscv32-esp-elf"
test_case "xtensa-esp32-espidf" "xtensa-esp32-elf"
test_case "aarch64-apple-ios-sim" "arm64-apple-ios-simulator"
test_case "aarch64-apple-tvos-sim" "arm64-apple-tvos-simulator"
test_case "aarch64-apple-watchos-sim" "arm64-apple-watchos-simulator"
echo ""
echo "All tests passed!"

Some files were not shown because too many files have changed in this diff Show More