[libcamera-ci,RFC,v1] Add clang builds with libstdc++
diff mbox series

Message ID 20260216142843.482262-1-barnabas.pocze@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-ci,RFC,v1] Add clang builds with libstdc++
Related show

Commit Message

Barnabás Pőcze Feb. 16, 2026, 2:28 p.m. UTC
Currently clang is only used to test libc++ builds. This, however, prevents
the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
so it needs to be disabled when using libc++.

So duplicate every current clang job for libstdc++ testing.

Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
Maybe it's not worth duplicating each clang job, but adding at least one
(clang, libstdc++) build is probably worth it.
---
 .gitlab-ci/meson/libstdc++.native |  3 +++
 gitlab-ci.yml                     | 36 ++++++++++++++-----------------
 2 files changed, 19 insertions(+), 20 deletions(-)
 create mode 100644 .gitlab-ci/meson/libstdc++.native

--
2.53.0

Comments

Kieran Bingham Feb. 23, 2026, 9:30 a.m. UTC | #1
Quoting Barnabás Pőcze (2026-02-16 14:28:43)
> Currently clang is only used to test libc++ builds. This, however, prevents
> the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
> so it needs to be disabled when using libc++.
> 
> So duplicate every current clang job for libstdc++ testing.
> 
> Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
> Maybe it's not worth duplicating each clang job, but adding at least one
> (clang, libstdc++) build is probably worth it.

I believe the freedesktop infrastructure have told us that the most
'expensive' part of CI is setting up the runner for the jobs, and we
have quite a few per run already.


Is it easy/possible for us to combine these additional builds into a
single job somehow?

I think the actual compilation test is 'cheap' once the runner has been
set up, so it might be helpful for us to look at how to combine more
tests, then it would be easy to also test many combinations of clang?

--
Kieran

> ---
>  .gitlab-ci/meson/libstdc++.native |  3 +++
>  gitlab-ci.yml                     | 36 ++++++++++++++-----------------
>  2 files changed, 19 insertions(+), 20 deletions(-)
>  create mode 100644 .gitlab-ci/meson/libstdc++.native
> 
> diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
> new file mode 100644
> index 0000000..3116043
> --- /dev/null
> +++ b/.gitlab-ci/meson/libstdc++.native
> @@ -0,0 +1,3 @@
> +[built-in options]
> +cpp_args = ['-stdlib=libstdc++']
> +cpp_link_args = ['-stdlib=libstdc++']
> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> index 6256335..e51266c 100644
> --- a/gitlab-ci.yml
> +++ b/gitlab-ci.yml
> @@ -29,7 +29,12 @@ variables:
>    # clang fails to link with ASan if --no-undefined is enabled.
>    MESON_CLANG_OPTIONS: >-
>      -D b_lundef=false
> +  MESON_CLANG_LIBCPP_OPTIONS: >-
> +    ${MESON_CLANG_OPTIONS}
>      --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
> +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
> +    ${MESON_CLANG_OPTIONS}
> +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
>    PACKAGES: >-
>      ca-certificates
>      git
> @@ -194,21 +199,14 @@ build-full:debian:12:
>            ${MESON_ALL_OPTIONS}
>            -D b_sanitize=none
>        - ARCH: amd64
> -        BUILD_TYPE: debug
> -        CC: clang
> -        CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> -      - ARCH: amd64
> -        BUILD_TYPE: release
> +        BUILD_TYPE:
> +          - debug
> +          - release
>          CC: clang
>          CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> +        MESON_OPTIONS:
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> 
>  build-full:debian:12:as-subproject:
>    extends:
> @@ -256,13 +254,11 @@ build-full:debian:13:
>        - ARCH: amd64
>          CC: clang
>          CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> -          -D cpp_debugstl=false
> -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> +        MESON_OPTIONS:
> +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>        - ARCH: armhf
>        - ARCH: arm64
> 
> --
> 2.53.0
Barnabás Pőcze Feb. 23, 2026, 9:41 a.m. UTC | #2
2026. 02. 23. 10:30 keltezéssel, Kieran Bingham írta:
> Quoting Barnabás Pőcze (2026-02-16 14:28:43)
>> Currently clang is only used to test libc++ builds. This, however, prevents
>> the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
>> so it needs to be disabled when using libc++.
>>
>> So duplicate every current clang job for libstdc++ testing.
>>
>> Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>> ---
>> Maybe it's not worth duplicating each clang job, but adding at least one
>> (clang, libstdc++) build is probably worth it.
> 
> I believe the freedesktop infrastructure have told us that the most
> 'expensive' part of CI is setting up the runner for the jobs, and we
> have quite a few per run already.
> 

It would be nice to put a concrete number on it then, because otherwise
any kind of planning is impossible.


> 
> Is it easy/possible for us to combine these additional builds into a
> single job somehow?
> 
> I think the actual compilation test is 'cheap' once the runner has been
> set up, so it might be helpful for us to look at how to combine more
> tests, then it would be easy to also test many combinations of clang?

I believe even all jobs could be combined into a single one if so desired, but
in my view merging like that definitely goes against the gitlab workflow
(wrt. variables, matrices, artifacts, etc).


> 
> --
> Kieran
> 
>> ---
>>   .gitlab-ci/meson/libstdc++.native |  3 +++
>>   gitlab-ci.yml                     | 36 ++++++++++++++-----------------
>>   2 files changed, 19 insertions(+), 20 deletions(-)
>>   create mode 100644 .gitlab-ci/meson/libstdc++.native
>>
>> diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
>> new file mode 100644
>> index 0000000..3116043
>> --- /dev/null
>> +++ b/.gitlab-ci/meson/libstdc++.native
>> @@ -0,0 +1,3 @@
>> +[built-in options]
>> +cpp_args = ['-stdlib=libstdc++']
>> +cpp_link_args = ['-stdlib=libstdc++']
>> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
>> index 6256335..e51266c 100644
>> --- a/gitlab-ci.yml
>> +++ b/gitlab-ci.yml
>> @@ -29,7 +29,12 @@ variables:
>>     # clang fails to link with ASan if --no-undefined is enabled.
>>     MESON_CLANG_OPTIONS: >-
>>       -D b_lundef=false
>> +  MESON_CLANG_LIBCPP_OPTIONS: >-
>> +    ${MESON_CLANG_OPTIONS}
>>       --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
>> +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
>> +    ${MESON_CLANG_OPTIONS}
>> +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
>>     PACKAGES: >-
>>       ca-certificates
>>       git
>> @@ -194,21 +199,14 @@ build-full:debian:12:
>>             ${MESON_ALL_OPTIONS}
>>             -D b_sanitize=none
>>         - ARCH: amd64
>> -        BUILD_TYPE: debug
>> -        CC: clang
>> -        CXX: clang++
>> -        MESON_OPTIONS: >-
>> -          ${MESON_ALL_OPTIONS}
>> -          ${MESON_CLANG_OPTIONS}
>> -          -D qcam=disabled
>> -      - ARCH: amd64
>> -        BUILD_TYPE: release
>> +        BUILD_TYPE:
>> +          - debug
>> +          - release
>>           CC: clang
>>           CXX: clang++
>> -        MESON_OPTIONS: >-
>> -          ${MESON_ALL_OPTIONS}
>> -          ${MESON_CLANG_OPTIONS}
>> -          -D qcam=disabled
>> +        MESON_OPTIONS:
>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>>
>>   build-full:debian:12:as-subproject:
>>     extends:
>> @@ -256,13 +254,11 @@ build-full:debian:13:
>>         - ARCH: amd64
>>           CC: clang
>>           CXX: clang++
>> -        MESON_OPTIONS: >-
>> -          ${MESON_ALL_OPTIONS}
>> -          ${MESON_CLANG_OPTIONS}
>> -          -D qcam=disabled
>> -          -D cpp_debugstl=false
>> -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
>> -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
>> +        MESON_OPTIONS:
>> +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
>> +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>>         - ARCH: armhf
>>         - ARCH: arm64
>>
>> --
>> 2.53.0
Barnabás Pőcze March 19, 2026, 10:45 a.m. UTC | #3
Hi

I would love to merge this in some capacity. Is this fine (duplicating every clang job),
or should I send a version that adds only one clang + libstdc++ job?


2026. 02. 16. 15:28 keltezéssel, Barnabás Pőcze írta:
> Currently clang is only used to test libc++ builds. This, however, prevents
> the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
> so it needs to be disabled when using libc++.
> 
> So duplicate every current clang job for libstdc++ testing.
> 
> Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
> Maybe it's not worth duplicating each clang job, but adding at least one
> (clang, libstdc++) build is probably worth it.
> ---
>   .gitlab-ci/meson/libstdc++.native |  3 +++
>   gitlab-ci.yml                     | 36 ++++++++++++++-----------------
>   2 files changed, 19 insertions(+), 20 deletions(-)
>   create mode 100644 .gitlab-ci/meson/libstdc++.native
> 
> diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
> new file mode 100644
> index 0000000..3116043
> --- /dev/null
> +++ b/.gitlab-ci/meson/libstdc++.native
> @@ -0,0 +1,3 @@
> +[built-in options]
> +cpp_args = ['-stdlib=libstdc++']
> +cpp_link_args = ['-stdlib=libstdc++']
> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> index 6256335..e51266c 100644
> --- a/gitlab-ci.yml
> +++ b/gitlab-ci.yml
> @@ -29,7 +29,12 @@ variables:
>     # clang fails to link with ASan if --no-undefined is enabled.
>     MESON_CLANG_OPTIONS: >-
>       -D b_lundef=false
> +  MESON_CLANG_LIBCPP_OPTIONS: >-
> +    ${MESON_CLANG_OPTIONS}
>       --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
> +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
> +    ${MESON_CLANG_OPTIONS}
> +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
>     PACKAGES: >-
>       ca-certificates
>       git
> @@ -194,21 +199,14 @@ build-full:debian:12:
>             ${MESON_ALL_OPTIONS}
>             -D b_sanitize=none
>         - ARCH: amd64
> -        BUILD_TYPE: debug
> -        CC: clang
> -        CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> -      - ARCH: amd64
> -        BUILD_TYPE: release
> +        BUILD_TYPE:
> +          - debug
> +          - release
>           CC: clang
>           CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> +        MESON_OPTIONS:
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> 
>   build-full:debian:12:as-subproject:
>     extends:
> @@ -256,13 +254,11 @@ build-full:debian:13:
>         - ARCH: amd64
>           CC: clang
>           CXX: clang++
> -        MESON_OPTIONS: >-
> -          ${MESON_ALL_OPTIONS}
> -          ${MESON_CLANG_OPTIONS}
> -          -D qcam=disabled
> -          -D cpp_debugstl=false
> -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> +        MESON_OPTIONS:
> +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>         - ARCH: armhf
>         - ARCH: arm64
> 
> --
> 2.53.0
Kieran Bingham March 19, 2026, 3:50 p.m. UTC | #4
Quoting Barnabás Pőcze (2026-03-19 10:45:22)
> Hi
> 
> I would love to merge this in some capacity. Is this fine (duplicating every clang job),
> or should I send a version that adds only one clang + libstdc++ job?

I'm fine merging either. Certainly at least the single instance could be
merged straight away.

We could also just merge this patch and see how it goes... we can always
pair it down a bit later if we want to optimise further.

As we discussed, other systems have more builders than we do ...

I guess the other approach is we could ask in #freedesktop for opinions
there.

Or we can simply merge this - and start adding our own dedicated runners
too!

So to indicate i don't want to block any approach here:


Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

--
Kieran


> 
> 
> 2026. 02. 16. 15:28 keltezéssel, Barnabás Pőcze írta:
> > Currently clang is only used to test libc++ builds. This, however, prevents
> > the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
> > so it needs to be disabled when using libc++.
> > 
> > So duplicate every current clang job for libstdc++ testing.
> > 
> > Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > ---
> > Maybe it's not worth duplicating each clang job, but adding at least one
> > (clang, libstdc++) build is probably worth it.
> > ---
> >   .gitlab-ci/meson/libstdc++.native |  3 +++
> >   gitlab-ci.yml                     | 36 ++++++++++++++-----------------
> >   2 files changed, 19 insertions(+), 20 deletions(-)
> >   create mode 100644 .gitlab-ci/meson/libstdc++.native
> > 
> > diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
> > new file mode 100644
> > index 0000000..3116043
> > --- /dev/null
> > +++ b/.gitlab-ci/meson/libstdc++.native
> > @@ -0,0 +1,3 @@
> > +[built-in options]
> > +cpp_args = ['-stdlib=libstdc++']
> > +cpp_link_args = ['-stdlib=libstdc++']
> > diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> > index 6256335..e51266c 100644
> > --- a/gitlab-ci.yml
> > +++ b/gitlab-ci.yml
> > @@ -29,7 +29,12 @@ variables:
> >     # clang fails to link with ASan if --no-undefined is enabled.
> >     MESON_CLANG_OPTIONS: >-
> >       -D b_lundef=false
> > +  MESON_CLANG_LIBCPP_OPTIONS: >-
> > +    ${MESON_CLANG_OPTIONS}
> >       --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
> > +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
> > +    ${MESON_CLANG_OPTIONS}
> > +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
> >     PACKAGES: >-
> >       ca-certificates
> >       git
> > @@ -194,21 +199,14 @@ build-full:debian:12:
> >             ${MESON_ALL_OPTIONS}
> >             -D b_sanitize=none
> >         - ARCH: amd64
> > -        BUILD_TYPE: debug
> > -        CC: clang
> > -        CXX: clang++
> > -        MESON_OPTIONS: >-
> > -          ${MESON_ALL_OPTIONS}
> > -          ${MESON_CLANG_OPTIONS}
> > -          -D qcam=disabled
> > -      - ARCH: amd64
> > -        BUILD_TYPE: release
> > +        BUILD_TYPE:
> > +          - debug
> > +          - release
> >           CC: clang
> >           CXX: clang++
> > -        MESON_OPTIONS: >-
> > -          ${MESON_ALL_OPTIONS}
> > -          ${MESON_CLANG_OPTIONS}
> > -          -D qcam=disabled
> > +        MESON_OPTIONS:
> > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
> > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> > 
> >   build-full:debian:12:as-subproject:
> >     extends:
> > @@ -256,13 +254,11 @@ build-full:debian:13:
> >         - ARCH: amd64
> >           CC: clang
> >           CXX: clang++
> > -        MESON_OPTIONS: >-
> > -          ${MESON_ALL_OPTIONS}
> > -          ${MESON_CLANG_OPTIONS}
> > -          -D qcam=disabled
> > -          -D cpp_debugstl=false
> > -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> > -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> > +        MESON_OPTIONS:
> > +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> > +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
> > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> >         - ARCH: armhf
> >         - ARCH: arm64
> > 
> > --
> > 2.53.0
>
Laurent Pinchart March 19, 2026, 4:15 p.m. UTC | #5
On Thu, Mar 19, 2026 at 03:50:47PM +0000, Kieran Bingham wrote:
> Quoting Barnabás Pőcze (2026-03-19 10:45:22)
> > Hi
> > 
> > I would love to merge this in some capacity. Is this fine (duplicating every clang job),
> > or should I send a version that adds only one clang + libstdc++ job?
> 
> I'm fine merging either. Certainly at least the single instance could be
> merged straight away.
> 
> We could also just merge this patch and see how it goes... we can always
> pair it down a bit later if we want to optimise further.
> 
> As we discussed, other systems have more builders than we do ...
> 
> I guess the other approach is we could ask in #freedesktop for opinions
> there.
> 
> Or we can simply merge this - and start adding our own dedicated runners
> too!

I have a slight preference for a bit more (energy-) conservative
approach, starting with fewer jobs and expanding if we realize that the
coverage isn't broad enough. We'll know it's the case if CI doesn't
catch issues before they hit the master branch, while it's more
difficult to know which CI jobs don't bring much value.

If you agree with that reasoning that would be my preferred option.
Otherwise, it's not a blocker.

> So to indicate i don't want to block any approach here:
> 
> 
> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> 
> > 2026. 02. 16. 15:28 keltezéssel, Barnabás Pőcze írta:
> > > Currently clang is only used to test libc++ builds. This, however, prevents
> > > the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
> > > so it needs to be disabled when using libc++.
> > > 
> > > So duplicate every current clang job for libstdc++ testing.
> > > 
> > > Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > > ---
> > > Maybe it's not worth duplicating each clang job, but adding at least one
> > > (clang, libstdc++) build is probably worth it.
> > > ---
> > >   .gitlab-ci/meson/libstdc++.native |  3 +++
> > >   gitlab-ci.yml                     | 36 ++++++++++++++-----------------
> > >   2 files changed, 19 insertions(+), 20 deletions(-)
> > >   create mode 100644 .gitlab-ci/meson/libstdc++.native
> > > 
> > > diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
> > > new file mode 100644
> > > index 0000000..3116043
> > > --- /dev/null
> > > +++ b/.gitlab-ci/meson/libstdc++.native
> > > @@ -0,0 +1,3 @@
> > > +[built-in options]
> > > +cpp_args = ['-stdlib=libstdc++']
> > > +cpp_link_args = ['-stdlib=libstdc++']
> > > diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> > > index 6256335..e51266c 100644
> > > --- a/gitlab-ci.yml
> > > +++ b/gitlab-ci.yml
> > > @@ -29,7 +29,12 @@ variables:
> > >     # clang fails to link with ASan if --no-undefined is enabled.
> > >     MESON_CLANG_OPTIONS: >-
> > >       -D b_lundef=false
> > > +  MESON_CLANG_LIBCPP_OPTIONS: >-
> > > +    ${MESON_CLANG_OPTIONS}
> > >       --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
> > > +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
> > > +    ${MESON_CLANG_OPTIONS}
> > > +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
> > >     PACKAGES: >-
> > >       ca-certificates
> > >       git
> > > @@ -194,21 +199,14 @@ build-full:debian:12:
> > >             ${MESON_ALL_OPTIONS}
> > >             -D b_sanitize=none
> > >         - ARCH: amd64
> > > -        BUILD_TYPE: debug
> > > -        CC: clang
> > > -        CXX: clang++
> > > -        MESON_OPTIONS: >-
> > > -          ${MESON_ALL_OPTIONS}
> > > -          ${MESON_CLANG_OPTIONS}
> > > -          -D qcam=disabled
> > > -      - ARCH: amd64
> > > -        BUILD_TYPE: release
> > > +        BUILD_TYPE:
> > > +          - debug
> > > +          - release
> > >           CC: clang
> > >           CXX: clang++
> > > -        MESON_OPTIONS: >-
> > > -          ${MESON_ALL_OPTIONS}
> > > -          ${MESON_CLANG_OPTIONS}
> > > -          -D qcam=disabled
> > > +        MESON_OPTIONS:
> > > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
> > > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> > > 
> > >   build-full:debian:12:as-subproject:
> > >     extends:
> > > @@ -256,13 +254,11 @@ build-full:debian:13:
> > >         - ARCH: amd64
> > >           CC: clang
> > >           CXX: clang++
> > > -        MESON_OPTIONS: >-
> > > -          ${MESON_ALL_OPTIONS}
> > > -          ${MESON_CLANG_OPTIONS}
> > > -          -D qcam=disabled
> > > -          -D cpp_debugstl=false
> > > -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> > > -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> > > +        MESON_OPTIONS:
> > > +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
> > > +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
> > > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
> > > +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
> > >         - ARCH: armhf
> > >         - ARCH: arm64
> > >
Barnabás Pőcze March 20, 2026, 8:18 a.m. UTC | #6
2026. 03. 19. 17:15 keltezéssel, Laurent Pinchart írta:
> On Thu, Mar 19, 2026 at 03:50:47PM +0000, Kieran Bingham wrote:
>> Quoting Barnabás Pőcze (2026-03-19 10:45:22)
>>> Hi
>>>
>>> I would love to merge this in some capacity. Is this fine (duplicating every clang job),
>>> or should I send a version that adds only one clang + libstdc++ job?
>>
>> I'm fine merging either. Certainly at least the single instance could be
>> merged straight away.
>>
>> We could also just merge this patch and see how it goes... we can always
>> pair it down a bit later if we want to optimise further.
>>
>> As we discussed, other systems have more builders than we do ...
>>
>> I guess the other approach is we could ask in #freedesktop for opinions
>> there.
>>
>> Or we can simply merge this - and start adding our own dedicated runners
>> too!
> 
> I have a slight preference for a bit more (energy-) conservative
> approach, starting with fewer jobs and expanding if we realize that the
> coverage isn't broad enough. We'll know it's the case if CI doesn't
> catch issues before they hit the master branch, while it's more
> difficult to know which CI jobs don't bring much value.
> 
> If you agree with that reasoning that would be my preferred option.
> Otherwise, it's not a blocker.

Okay, I have proposed a new version that only adds 1 job.


> 
>> So to indicate i don't want to block any approach here:
>>
>>
>> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>
>>> 2026. 02. 16. 15:28 keltezéssel, Barnabás Pőcze írta:
>>>> Currently clang is only used to test libc++ builds. This, however, prevents
>>>> the build testing of e.g. qcam since the packaged qt libraries use libstdc++,
>>>> so it needs to be disabled when using libc++.
>>>>
>>>> So duplicate every current clang job for libstdc++ testing.
>>>>
>>>> Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>>>> ---
>>>> Maybe it's not worth duplicating each clang job, but adding at least one
>>>> (clang, libstdc++) build is probably worth it.
>>>> ---
>>>>    .gitlab-ci/meson/libstdc++.native |  3 +++
>>>>    gitlab-ci.yml                     | 36 ++++++++++++++-----------------
>>>>    2 files changed, 19 insertions(+), 20 deletions(-)
>>>>    create mode 100644 .gitlab-ci/meson/libstdc++.native
>>>>
>>>> diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
>>>> new file mode 100644
>>>> index 0000000..3116043
>>>> --- /dev/null
>>>> +++ b/.gitlab-ci/meson/libstdc++.native
>>>> @@ -0,0 +1,3 @@
>>>> +[built-in options]
>>>> +cpp_args = ['-stdlib=libstdc++']
>>>> +cpp_link_args = ['-stdlib=libstdc++']
>>>> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
>>>> index 6256335..e51266c 100644
>>>> --- a/gitlab-ci.yml
>>>> +++ b/gitlab-ci.yml
>>>> @@ -29,7 +29,12 @@ variables:
>>>>      # clang fails to link with ASan if --no-undefined is enabled.
>>>>      MESON_CLANG_OPTIONS: >-
>>>>        -D b_lundef=false
>>>> +  MESON_CLANG_LIBCPP_OPTIONS: >-
>>>> +    ${MESON_CLANG_OPTIONS}
>>>>        --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
>>>> +  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
>>>> +    ${MESON_CLANG_OPTIONS}
>>>> +    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
>>>>      PACKAGES: >-
>>>>        ca-certificates
>>>>        git
>>>> @@ -194,21 +199,14 @@ build-full:debian:12:
>>>>              ${MESON_ALL_OPTIONS}
>>>>              -D b_sanitize=none
>>>>          - ARCH: amd64
>>>> -        BUILD_TYPE: debug
>>>> -        CC: clang
>>>> -        CXX: clang++
>>>> -        MESON_OPTIONS: >-
>>>> -          ${MESON_ALL_OPTIONS}
>>>> -          ${MESON_CLANG_OPTIONS}
>>>> -          -D qcam=disabled
>>>> -      - ARCH: amd64
>>>> -        BUILD_TYPE: release
>>>> +        BUILD_TYPE:
>>>> +          - debug
>>>> +          - release
>>>>            CC: clang
>>>>            CXX: clang++
>>>> -        MESON_OPTIONS: >-
>>>> -          ${MESON_ALL_OPTIONS}
>>>> -          ${MESON_CLANG_OPTIONS}
>>>> -          -D qcam=disabled
>>>> +        MESON_OPTIONS:
>>>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
>>>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>>>>
>>>>    build-full:debian:12:as-subproject:
>>>>      extends:
>>>> @@ -256,13 +254,11 @@ build-full:debian:13:
>>>>          - ARCH: amd64
>>>>            CC: clang
>>>>            CXX: clang++
>>>> -        MESON_OPTIONS: >-
>>>> -          ${MESON_ALL_OPTIONS}
>>>> -          ${MESON_CLANG_OPTIONS}
>>>> -          -D qcam=disabled
>>>> -          -D cpp_debugstl=false
>>>> -        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
>>>> -        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
>>>> +        MESON_OPTIONS:
>>>> +          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
>>>> +          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
>>>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
>>>> +          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
>>>>          - ARCH: armhf
>>>>          - ARCH: arm64
>>>>
>

Patch
diff mbox series

diff --git a/.gitlab-ci/meson/libstdc++.native b/.gitlab-ci/meson/libstdc++.native
new file mode 100644
index 0000000..3116043
--- /dev/null
+++ b/.gitlab-ci/meson/libstdc++.native
@@ -0,0 +1,3 @@ 
+[built-in options]
+cpp_args = ['-stdlib=libstdc++']
+cpp_link_args = ['-stdlib=libstdc++']
diff --git a/gitlab-ci.yml b/gitlab-ci.yml
index 6256335..e51266c 100644
--- a/gitlab-ci.yml
+++ b/gitlab-ci.yml
@@ -29,7 +29,12 @@  variables:
   # clang fails to link with ASan if --no-undefined is enabled.
   MESON_CLANG_OPTIONS: >-
     -D b_lundef=false
+  MESON_CLANG_LIBCPP_OPTIONS: >-
+    ${MESON_CLANG_OPTIONS}
     --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
+  MESON_CLANG_LIBSTDCPP_OPTIONS: >-
+    ${MESON_CLANG_OPTIONS}
+    --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libstdc++.native
   PACKAGES: >-
     ca-certificates
     git
@@ -194,21 +199,14 @@  build-full:debian:12:
           ${MESON_ALL_OPTIONS}
           -D b_sanitize=none
       - ARCH: amd64
-        BUILD_TYPE: debug
-        CC: clang
-        CXX: clang++
-        MESON_OPTIONS: >-
-          ${MESON_ALL_OPTIONS}
-          ${MESON_CLANG_OPTIONS}
-          -D qcam=disabled
-      - ARCH: amd64
-        BUILD_TYPE: release
+        BUILD_TYPE:
+          - debug
+          - release
         CC: clang
         CXX: clang++
-        MESON_OPTIONS: >-
-          ${MESON_ALL_OPTIONS}
-          ${MESON_CLANG_OPTIONS}
-          -D qcam=disabled
+        MESON_OPTIONS:
+          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled
+          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}

 build-full:debian:12:as-subproject:
   extends:
@@ -256,13 +254,11 @@  build-full:debian:13:
       - ARCH: amd64
         CC: clang
         CXX: clang++
-        MESON_OPTIONS: >-
-          ${MESON_ALL_OPTIONS}
-          ${MESON_CLANG_OPTIONS}
-          -D qcam=disabled
-          -D cpp_debugstl=false
-        # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
-        # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
+        MESON_OPTIONS:
+          # `cpp_debugstl=false` needed approximately between meson 1.4.0 and 1.9.3
+          # with clang 18 or later due to https://github.com/mesonbuild/meson/issues/13812
+          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled -D cpp_debugstl=false
+          - ${MESON_ALL_OPTIONS} ${MESON_CLANG_LIBSTDCPP_OPTIONS}
       - ARCH: armhf
       - ARCH: arm64