Export DIST_DIR to soong on dist builds.
Bug: 64267858
Test: Adding DistDir to build/soong/android/variable.go enables access
to DIST_DIR_SOONG.
Change-Id: I74faea11255edf37db6a4eaf193df300c363bfb7
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 5ebd123..a90e5af 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -119,6 +119,8 @@
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
+$(call add_json_str, DistDir, $(if $(dist_goal), $(DIST_DIR)))
+
_contents := $(subst $(comma)$(newline)__SV_END,$(newline)}$(newline),$(_contents)__SV_END)
$(file >$(SOONG_VARIABLES).tmp,$(_contents))