Export BUILDING_PRODUCT_IMAGE to Soong

The variable is used to determine whether a product partition filesystem
module is generated for a specific product

Test: m soong_generated_product_filesystem_test
Bug: 374388294
Change-Id: I2994a6031572427f016d258ad7961a2c29faf0e8
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 54550d4..01e4697 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -185,6 +185,7 @@
 $(call add_json_bool, BuildingVendorImage,               $(BUILDING_VENDOR_IMAGE))
 $(call add_json_str,  OdmPath,                           $(TARGET_COPY_OUT_ODM))
 $(call add_json_str,  ProductPath,                       $(TARGET_COPY_OUT_PRODUCT))
+$(call add_json_bool, BuildingProductImage,              $(BUILDING_PRODUCT_IMAGE))
 $(call add_json_str,  SystemExtPath,                     $(TARGET_COPY_OUT_SYSTEM_EXT))
 $(call add_json_bool, MinimizeJavaDebugInfo,             $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))