Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971ef8ec authored by Cole Faust's avatar Cole Faust
Browse files

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
parent 52233be2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -334,8 +334,9 @@ $(eval _dump_variables_rbc_excluded := \
  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)),\