From e9288e2ee5aa6c1637212ca4b51cd0a951b7bd05 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Mon, 2 Aug 2021 18:34:11 +0900 Subject: meson: Update min clang version to 9 __builtin_FILE and __builtin_LINE are first defined in clang 9. With clang of any version less than that we have the following compilation errors: ../../include/libcamera/base/log.h:94:27: error: use of undeclared identifier '__builtin_FILE' const char *fileName = __builtin_FILE(), ^ ../../include/libcamera/base/log.h:95:24: error: use of undeclared identifier '__builtin_LINE' unsigned int line = __builtin_LINE()) const; ^ ../../include/libcamera/base/log.h:99:26: error: use of undeclared identifier '__builtin_FILE' const char *fileName = __builtin_FILE(), ^ ../../include/libcamera/base/log.h:100:23: error: use of undeclared identifier '__builtin_LINE' unsigned int line = __builtin_LINE()); Enforce clang version of at least 9 in the main meson file. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 6eed0d8c..a49c484f 100644 --- a/meson.build +++ b/meson.build @@ -50,8 +50,8 @@ c_arguments = [] cpp_arguments = [] if cc.get_id() == 'clang' - if cc.version().version_compare('<5') - error('clang version is too old, libcamera requires 5.0 or newer') + if cc.version().version_compare('<9') + error('clang version is too old, libcamera requires 9.0 or newer') endif # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1 -- cgit v1.2.1