| Message ID | 20260320081845.748430-1-barnabas.pocze@ideasonboard.com |
|---|---|
| State | Accepted |
| Headers | show |
| Series |
|
| Related | show |
On Fri, Mar 20, 2026 at 09:18:45AM +0100, Barnabás Pőcze wrote: > 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 add a clang build job that compiles with libstdc++ on debian 13. > > Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315 > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > changes in v2: > * only add a single new job (instead of 4) > > v1: https://patchwork.libcamera.org/patch/26160/ > --- > .gitlab-ci/meson/libstdc++.native | 3 +++ > gitlab-ci.yml | 21 ++++++++++++--------- > 2 files changed, 15 insertions(+), 9 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..6ff88b2 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 > @@ -199,7 +204,7 @@ build-full:debian:12: > CXX: clang++ > MESON_OPTIONS: >- > ${MESON_ALL_OPTIONS} > - ${MESON_CLANG_OPTIONS} > + ${MESON_CLANG_LIBCPP_OPTIONS} > -D qcam=disabled > - ARCH: amd64 > BUILD_TYPE: release > @@ -207,7 +212,7 @@ build-full:debian:12: > CXX: clang++ > MESON_OPTIONS: >- > ${MESON_ALL_OPTIONS} > - ${MESON_CLANG_OPTIONS} > + ${MESON_CLANG_LIBCPP_OPTIONS} > -D qcam=disabled > > build-full:debian:12:as-subproject: > @@ -256,13 +261,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 >
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..6ff88b2 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 @@ -199,7 +204,7 @@ build-full:debian:12: CXX: clang++ MESON_OPTIONS: >- ${MESON_ALL_OPTIONS} - ${MESON_CLANG_OPTIONS} + ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled - ARCH: amd64 BUILD_TYPE: release @@ -207,7 +212,7 @@ build-full:debian:12: CXX: clang++ MESON_OPTIONS: >- ${MESON_ALL_OPTIONS} - ${MESON_CLANG_OPTIONS} + ${MESON_CLANG_LIBCPP_OPTIONS} -D qcam=disabled build-full:debian:12:as-subproject: @@ -256,13 +261,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