soong_config: Add TARGET_USES_QCOM_BSP_LEGACY

Change-Id: Ia5ddfa263df71388b19c77d2509c29791177208d
diff --git a/build/core/qcom_target.mk b/build/core/qcom_target.mk
index 3b14cca..c25aa7c 100644
--- a/build/core/qcom_target.mk
+++ b/build/core/qcom_target.mk
@@ -42,6 +42,7 @@
     TARGET_COMPILE_WITH_MSM_KERNEL := true
 
     ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
+        TARGET_USES_QCOM_BSP_LEGACY := true
         # Enable legacy audio functions
         ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
             USE_CUSTOM_AUDIO_POLICY := 1
diff --git a/build/soong/android/variable.go b/build/soong/android/variable.go
index 8ed22f7..221bf97 100644
--- a/build/soong/android/variable.go
+++ b/build/soong/android/variable.go
@@ -6,10 +6,14 @@
 	Uses_generic_camera_parameter_library struct {
 		Srcs []string
 	}
+	Uses_qcom_bsp_legacy struct {
+		Cppflags []string
+	}
 }
 
 type ProductVariables struct {
 	Uses_generic_camera_parameter_library  *bool `json:",omitempty"`
 	Specific_camera_parameter_library  *string `json:",omitempty"`
 	Needs_text_relocations  *bool `json:",omitempty"`
+	Uses_qcom_bsp_legacy  *bool `json:",omitempty"`
 }
diff --git a/build/soong/soong_config.mk b/build/soong/soong_config.mk
index be59277..b5e469c 100644
--- a/build/soong/soong_config.mk
+++ b/build/soong/soong_config.mk
@@ -6,6 +6,7 @@
 	echo '"Lineage": {'; \
 	echo '    "Uses_generic_camera_parameter_library": $(if $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY),false,true),'; \
 	echo '    "Specific_camera_parameter_library": "$(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY)",'; \
-	echo '    "Needs_text_relocations": $(if $(filter true,$(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS)),true,false)'; \
+	echo '    "Needs_text_relocations": $(if $(filter true,$(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS)),true,false),'; \
+	echo '    "Uses_qcom_bsp_legacy": $(if $(filter true,$(TARGET_USES_QCOM_BSP_LEGACY)),true,false)'; \
 	echo '},'; \
 	echo '') > $(SOONG_VARIABLES_TMP)