[libcamera-devel] [RFC PATCH] lc-compliance: Disable clang builds

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Sep 9 17:02:38 CEST 2021


On distributions with clang and gcc, the gtest library is usually
expected to be compiled with gcc. This causes a build failure due
to the abi incompatibility.

Ideally this would be solved, or detected to be incompatible, but it may
not be simple to identify the ABI used for an installed library with
meson to check if it is compatible.

Restrict lc-compliance to gcc builds only, knowing that if a fully
clang-built OS or environment later wants to enable this, a new solution
will need to be found.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/lc-compliance/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build
index aa5852f6cb87..416405b4e67b 100644
--- a/src/lc-compliance/meson.build
+++ b/src/lc-compliance/meson.build
@@ -8,6 +8,12 @@ if not (libevent.found() and libgtest.found())
     subdir_done()
 endif
 
+if cc.get_id() == 'clang'
+    lc_compliance_enabled = false
+    warning('Disabling lc-compliance on clang due to gtest package incompatibility')
+    subdir_done()
+endif
+
 lc_compliance_enabled = true
 
 lc_compliance_sources = files([
-- 
2.30.2



More information about the libcamera-devel mailing list