Re: [PATCH v2 1/1] scripts/rust_is_available: Fix clang version check

From: Martin Rodriguez Reboredo
Date: Sun May 28 2023 - 10:39:43 EST


On 5/28/23 10:18, Ethan D. Twardy wrote:
[...]
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -102,8 +102,8 @@ fi
# Check that the `libclang` used by the Rust bindings generator is suitable.
bindgen_libclang_version=$( \
LC_ALL=C "$BINDGEN" $(dirname $0)/rust_is_available_bindgen_libclang.h 2>&1 >/dev/null \
- | grep -F 'clang version ' \
- | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
+ | grep -oE 'clang version [0-9]+\.[0-9]+\.[0-9]+' \
+ | cut -d' ' -f3 \
| head -n 1 \
)
bindgen_libclang_min_version=$($min_tool_version llvm)

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>