From patchwork Mon Jan 5 09:31:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 25622 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3DA3EBDCBF for ; Mon, 5 Jan 2026 09:31:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DCD7F61FBC; Mon, 5 Jan 2026 10:31:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LJeVTctg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3B3AD61F84 for ; Mon, 5 Jan 2026 10:31:34 +0100 (CET) Received: from pb-laptop.local (185.221.143.114.nat.pool.zt.hu [185.221.143.114]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 35DEC10D for ; Mon, 5 Jan 2026 10:31:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1767605474; bh=jJ5v41v5UlXkgqH/naKKn9XrqbAf5sYCShlR12LlRvg=; h=From:To:Subject:Date:From; b=LJeVTctghJUkGpLSsd2RsQA5oxOnzBfLp7VzGsrOlppKPsd1saAT95XN8paVV4ABy lVlz13s0C4tg93VmaZRA2I7O5bLPtKqftQO+JHwqhoxpRz4j/GPBzmaoIuvsuhT3J6 gIB6Y3h09S3ek1otL+X5hZqCK2+LAWIib8r7D9xk= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [PATCH v1] Force libc++ with meson native files Date: Mon, 5 Jan 2026 10:31:30 +0100 Message-ID: <20260105093130.1177121-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- .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 diff --git a/.gitlab-ci/meson/clang.native b/.gitlab-ci/meson/clang.native new file mode 100644 index 0000000..f00b0f0 --- /dev/null +++ b/.gitlab-ci/meson/clang.native @@ -0,0 +1,3 @@ +[binaries] +c = ['clang'] +cpp = ['clang++'] diff --git a/.gitlab-ci/meson/libc++.native b/.gitlab-ci/meson/libc++.native new file mode 100644 index 0000000..9c99d5a --- /dev/null +++ b/.gitlab-ci/meson/libc++.native @@ -0,0 +1,3 @@ +[built-in options] +cpp_args = ['-stdlib=libc++'] +cpp_link_args = ['-stdlib=libc++'] diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 262d519..2e2c4c9 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -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: