[PATCH v2] ci: check C++ headers with clang
David Marchand
david.marchand at redhat.com
Thu Jul 3 10:20:10 CEST 2025
If not passing an explicit compiler for C++, meson uses c++ which
defaults to /usr/bin/g++ on a Ubuntu system.
Explicitly choose which compiler to use for C++.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
Changes since v1:
- rebased,
- moved CXX tweaking in the branch enabling headers check,
---
.ci/linux-build.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index e9272d3931..5c4bfa75c3 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -102,9 +102,14 @@ OPTS="$OPTS -Dplatform=generic"
OPTS="$OPTS -Ddefault_library=$DEF_LIB"
OPTS="$OPTS -Dbuildtype=$buildtype"
if [ "$STDATOMIC" = "true" ]; then
- OPTS="$OPTS -Denable_stdatomic=true"
+ OPTS="$OPTS -Denable_stdatomic=true"
else
- OPTS="$OPTS -Dcheck_includes=true"
+ OPTS="$OPTS -Dcheck_includes=true"
+ if [ "${CC%%clang}" != "$CC" ]; then
+ export CXX=clang++
+ else
+ export CXX=g++
+ fi
fi
if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
--
2.50.0
More information about the dev
mailing list