QcomModulePkg: Enable the sdllvm analyze under a flag
Enable the --compile-and-analyze only when SDLLVM toolchain is used.
Change-Id: I18809c63b0d585fc7bb0cfea788f82290d2eda33
diff --git a/AndroidBoot.mk b/AndroidBoot.mk
index b377baf..c9b3fca 100644
--- a/AndroidBoot.mk
+++ b/AndroidBoot.mk
@@ -1,8 +1,15 @@
#Android makefile to build bootloader as a part of Android Build
-ifeq ($(shell echo $(SDCLANG_PATH) | head -c 1),/)
- CLANG_BIN := $(SDCLANG_PATH)/
-else
- CLANG_BIN := $(ANDROID_BUILD_TOP)/$(SDCLANG_PATH)/
+CLANG_BIN := $(ANDROID_BUILD_TOP)/$(LLVM_PREBUILTS_PATH)/
+ABL_USE_SDLLVM := false
+
+ifneq ($(wildcard $(SDCLANG_PATH)),)
+ ifeq ($(shell echo $(SDCLANG_PATH) | head -c 1),/)
+ CLANG_BIN := $(SDCLANG_PATH)/
+ else
+ CLANG_BIN := $(ANDROID_BUILD_TOP)/$(SDCLANG_PATH)/
+ endif
+
+ ABL_USE_SDLLVM := true
endif
ifneq ($(wildcard $(SDCLANG_PATH_2)),)
@@ -11,6 +18,8 @@
else
CLANG_BIN := $(ANDROID_BUILD_TOP)/$(SDCLANG_PATH_2)/
endif
+
+ ABL_USE_SDLLVM := true
endif
ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true)
@@ -70,6 +79,7 @@
$(USER_BUILD_VARIANT) \
CLANG_BIN=$(CLANG_BIN) \
CLANG_PREFIX=$(CLANG35_PREFIX)\
+ ABL_USE_SDLLVM=$(ABL_USE_SDLLVM) \
CLANG_GCC_TOOLCHAIN=$(CLANG35_GCC_TOOLCHAIN)\
TARGET_ARCHITECTURE=$(TARGET_ARCHITECTURE)