Fix "posix_spawn: Argument list too long" issue

The shell command was too long when it listed all the make variables.
Dump them to a file instead.

Fixes: 228347189
Test: RBC_BOARD_CONFIG=1 m nothing on aosp_arm64
Change-Id: I325c78810f5efbe87df2c3ffc269ed78db8c3732
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 62ea1b6..049a4d6 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -334,8 +334,9 @@
   USER \
   SOONG_% \
   PRODUCT_COPY_OUT_%)\
+$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES))))
 $(file >$(1),\
-$(foreach v, $(shell echo $(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES)) | tr ' ' '\n' | grep -he "^[A-Z][A-Z0-9_]*$$"),\
+$(foreach v, $(shell grep -he "^[A-Z][A-Z0-9_]*$$" $(OUT_DIR)/dump-variables-rbc-temp.txt),\
 $(v) := $(strip $($(v)))$(newline))\
 $(foreach ns,$(SOONG_CONFIG_NAMESPACES),\
 $(foreach v,$(SOONG_CONFIG_$(ns)),\