new file mode 100644
@@ -0,0 +1,3 @@
+[binaries]
+c = ['clang']
+cpp = ['clang++']
new file mode 100644
@@ -0,0 +1,3 @@
+[built-in options]
+cpp_args = ['-stdlib=libc++']
+cpp_link_args = ['-stdlib=libc++']
@@ -30,6 +30,8 @@ variables:
# clang fails to link with ASan if --no-undefined is enabled.
MESON_CLANG_OPTIONS: >-
-D b_lundef=false
+ --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/clang.native
+ --native-file $CI_PROJECT_DIR/.gitlab-ci/meson/libc++.native
PACKAGES: >-
ca-certificates
git
@@ -322,6 +324,8 @@ build-full:debian:13:
${MESON_ALL_OPTIONS}
${MESON_CLANG_OPTIONS}
-D qcam=disabled
+ -D cpp_debugstl=false
+ # `cpp_debugstl=false` needed due to https://github.com/mesonbuild/meson/issues/13812
build-full:arch:
extends:
Currently libcamera's meson scripts force the usage of libc++ if clang is detected as the compiler. This is not ideal because it cannot be overridden by the user. So instead of depending on this behaviour for libc++ testing, use meson native files to force the use of libc++ with clang. Unfortunately on debian 13, due a meson bug, a workaround is needed to avoid a macro redefinition error[0]. [0]: https://github.com/mesonbuild/meson/issues/13812 Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/226 Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- .gitlab-ci/meson/clang.native | 3 +++ .gitlab-ci/meson/libc++.native | 3 +++ gitlab-ci.yml | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 .gitlab-ci/meson/clang.native create mode 100644 .gitlab-ci/meson/libc++.native -- 2.52.0