[PATCH 08/16] UBUNTU: SAUCE: rust: properly detect the version of libclang used by bindgen
Andrea Righi
andrea.righi at canonical.com
Thu Mar 16 09:05:21 UTC 2023
BugLink: https://bugs.launchpad.net/bugs/2007654
Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
scripts/rust_is_available.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
index aebbf1913970..19fec6cdff0b 100755
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -102,9 +102,7 @@ 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]+' \
- | head -n 1 \
+ | sed -ne 's/.*clang version \([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p'
)
bindgen_libclang_min_version=$($min_tool_version llvm)
bindgen_libclang_cversion=$(get_canonical_version $bindgen_libclang_version)
--
2.39.2
More information about the kernel-team
mailing list