Skip to content

Commit 2f787ec

Browse files
tpamborstephanosio
authored andcommitted
scripts: llvm: Enable static analyzer
Enable static analyzer and provide clang-extdef-mapping for Cross Translation Unit (CTU) analysis. Signed-off-by: Tim Pambor <[email protected]>
1 parent 06c8971 commit 2f787ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/llvm/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ endif()
156156

157157
set(BUG_REPORT_URL "https://github.com/zephyrproject-rtos/sdk-ng/issues" CACHE STRING "")
158158
set(LLVM_DISTRIBUTION_COMPONENTS
159+
clang-extdef-mapping
159160
clang-resource-headers
160161
clang
161162
dsymutil
@@ -194,6 +195,7 @@ set(LLVM_DEFAULT_TARGET_TRIPLE aarch64-linux-gnu CACHE STRING "")
194195
set(LLVM_APPEND_VC_REV OFF CACHE BOOL "")
195196
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
196197
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
198+
set(CLANG_ENABLE_STATIC_ANALYZER ON CACHE BOOL "")
197199

198200
# Default to a release build
199201
# (CMAKE_BUILD_TYPE is a special CMake variable so if you want to set

0 commit comments

Comments
 (0)