On Tue, Jul 1, 2025 at 1:33 PM David Marchand <david.march...@redhat.com> wrote:
>
> 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.march...@redhat.com>
> ---
> Depends-on: series-35592 ("node: fix C++ compatibility errors (option 2)")
>
> ---
>  .ci/linux-build.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index e9272d3931..6156fc0e80 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -54,6 +54,12 @@ check_traces() {
>
>  cross_file=
>
> +if [ "${CC%%clang}" != "$CC" ]; then
> +    export CXX=clang++
> +else
> +    export CXX=g++
> +fi
> +

Looking again, it may be safer to move this block in the
check_includes branch (wrt cross compilation targets, though I would
expect the cross config file to override any CC or CXX variables
content).
But let's see what the CI has to tell with this first revision.

>  if [ "$AARCH64" = "true" ]; then
>      if [ "${CC%%clang}" != "$CC" ]; then
>          cross_file=config/arm/arm64_armv8_linux_clang_ubuntu


-- 
David Marchand

Reply via email to