[v2] utils: abi-compat: Configure for C++20 to support std::span
diff mbox series

Message ID 20261203155258.3348209-1-kieran.bingham@ideasonboard.com
State New
Headers show
Series
  • [v2] utils: abi-compat: Configure for C++20 to support std::span
Related show

Commit Message

Kieran Bingham Dec. 3, 2026, 3:52 p.m. UTC
Now that we use std::span, we need to pass -std=c++20 to the compliance
checker invocations of GCC to allow those.

As we might change the C++ standard in the future, identify the standard
from the current build and pass that to the abi-compliance tool.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

---
v2:
 - Use cpp_std defined by meson.

 utils/abi-compat.sh | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/utils/abi-compat.sh b/utils/abi-compat.sh
index 31f61e320404..c52d59d681ac 100755
--- a/utils/abi-compat.sh
+++ b/utils/abi-compat.sh
@@ -176,7 +176,11 @@  create_abi_dump() {
 			"$version" \
 			"$install"
 
+		CPP_STD=$(jq -r '.[] | select(.name == "cpp_std") | .value' \
+			  "$build/meson-info/intro-buildoptions.json")
+
 		abi-compliance-checker \
+			-gcc-options "-std=$CPP_STD" \
 			-lib libcamera \
 			-v1 "$version" \
 			-dump "$install/libcamera-abi-dump.xml" \