Files
mesa/.gitlab-ci/container/build-bindgen.sh
Matt Jolly 1a698c75ae build: Rust: Bump minimum Meson and bindgen version
Meson 1.7.0 is required to ensure that generated bindings
are suitable for use with the selected Rust compiler.

Bindgen is bumped to 0.71.1 which has more permissive handling of
`--rust-target`, enabling (almost) any valid Rust version to be
passed as a target; `-nightly` and `-beta*` suffixes are an exception
to this.

This behaviour is expected to improve further with later versions of
Meson; upstream fixes have landed that:

 - pass a stripped version string to bindgen
 - additionally pass an appropriate `--rust-edition` if `rust_std` is
   set (or "nightly" if the compiler is `nightly`).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12680
Bug: https://bugs.gentoo.org/946913
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00

29 lines
663 B
Bash

#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
uncollapsed_section_start bindgen "Building bindgen"
BINDGEN_VER=0.71.1
CBINDGEN_VER=0.26.0
# bindgen
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
bindgen-cli --version ${BINDGEN_VER} \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
# cbindgen
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
cbindgen --version ${CBINDGEN_VER} \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
section_end bindgen