ANDROID: Add clang-tidy/clang-analyzer support for mixed build environment
Running clang-tidy/clang-analyzer with MAKE_GOALS fails in a mixed build environment because archive files pertaining to the vmlinux are expected as input to make rule. This would cause a failure when generating compile_commands.json file, so we need to indicate that we are running a mixed build environment when running clang-tidy/ clang-analyzer. Bug: 233781076 Change-Id: I67afee105eb52c245aab04172c5a397bd8593532 Signed-off-by: Shubhi Jain <quic_shubhij@quicinc.com>
This commit is contained in:
@@ -1925,7 +1925,7 @@ quiet_cmd_gen_compile_commands = GEN $@
|
||||
cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs))
|
||||
|
||||
$(extmod_prefix)compile_commands.json: scripts/clang-tools/gen_compile_commands.py \
|
||||
$(if $(KBUILD_EXTMOD),,$(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)) \
|
||||
$(if $(KBUILD_EXTMOD)$(KBUILD_MIXED_TREE),,$(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)) \
|
||||
$(if $(CONFIG_MODULES), $(MODORDER)) FORCE
|
||||
$(call if_changed,gen_compile_commands)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user