diff options
Diffstat (limited to 'scripts/rust_is_available.sh')
| -rwxr-xr-x | scripts/rust_is_available.sh | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh index 5262c56dd674..93c0ef7fb3fb 100755 --- a/scripts/rust_is_available.sh +++ b/scripts/rust_is_available.sh @@ -225,6 +225,21 @@ if [ "$bindgen_libclang_cversion" -lt "$bindgen_libclang_min_cversion" ]; then  	exit 1  fi +if [ "$bindgen_libclang_cversion" -ge 1900100 ] && +	[ "$rust_bindings_generator_cversion" -lt 6905 ]; then +	# Distributions may have patched the issue (e.g. Debian did). +	if ! "$BINDGEN" $(dirname $0)/rust_is_available_bindgen_libclang_concat.h | grep -q foofoo; then +		echo >&2 "***" +		echo >&2 "*** Rust bindings generator '$BINDGEN' < 0.69.5 together with libclang >= 19.1" +		echo >&2 "*** may not work due to a bug (https://github.com/rust-lang/rust-bindgen/pull/2824)," +		echo >&2 "*** unless patched (like Debian's)." +		echo >&2 "***   Your bindgen version:  $rust_bindings_generator_version" +		echo >&2 "***   Your libclang version: $bindgen_libclang_version" +		echo >&2 "***" +		warning=1 +	fi +fi +  # If the C compiler is Clang, then we can also check whether its version  # matches the `libclang` version used by the Rust bindings generator.  # | 
