summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-01 16:53:40 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-01 13:46:45 +0200
commit16efd83f5dafb8261aac2e955576bc7d474043f9 (patch)
tree7b917003954badcfe0133adf7db46f45ecdb13c2 /meson.build
parent7b86854e4014b10844848f9619c648e6ccfbf9c6 (diff)
libcamera: base: Add thread safety annotation macros
Clang compiler is able to do a thread safety analysis with annotations [1]. This introduces the thread safety annotation macros and also enable the analysis by adding -Wthread-safety if a clang compiler is used. [1] https://clang.llvm.org/docs/ThreadSafetyAnalysis.html. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index d1074594..a20cc29e 100644
--- a/meson.build
+++ b/meson.build
@@ -72,6 +72,7 @@ if cc.get_id() == 'clang'
cpp_arguments += [
'-Wextra-semi',
+ '-Wthread-safety',
]
endif