edk2: AndroidBoot.mk: Add support for FORCE_SDCLANG_OFF
Set FORCE_SDCLANG_OFF to true in sdclang.json to force
all modules to be compiled by AOSP LLVM.
This unconditionally turns off SDCLANG even if a module
sets LOCAL_SDCLANG (in Android.mk) or sdclang (in Android.bp)
to true.
Change-Id: Iaed76e5c3f59e9aaf76156c9abdbe9db17fbab57
diff --git a/AndroidBoot.mk b/AndroidBoot.mk
index 85ab52f..0f34d1c 100644
--- a/AndroidBoot.mk
+++ b/AndroidBoot.mk
@@ -3,6 +3,7 @@
CLANG_BIN := $(ANDROID_TOP)/$(LLVM_PREBUILTS_PATH)/
ABL_USE_SDLLVM := false
+ifneq ($(FORCE_SDCLANG_OFF),true)
ifneq ($(wildcard $(SDCLANG_PATH)),)
ifeq ($(shell echo $(SDCLANG_PATH) | head -c 1),/)
CLANG_BIN := $(SDCLANG_PATH)/
@@ -12,6 +13,7 @@
ABL_USE_SDLLVM := true
endif
+endif
# LD & make are not available in prebuilts for older Android versions
ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) > 27 ))" )))