chore: response file to avoid arg limits in lean static lib build (#3612)

This commit is contained in:
Mac Malone 2024-03-11 12:14:24 -04:00 committed by GitHub
parent 32dcc6eb89
commit ebefee0b7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -123,9 +123,18 @@ else
$(LEANC) -o "$@" $^ $(LEANC_OPTS) $(LINK_OPTS)
endif
ifeq (@CMAKE_SYSTEM_NAME@, Windows)
$(LIB_OUT)/$(STATIC_LIB_NAME): $(addprefix $(TEMP_OUT)/,$(REL_OS)) | $(LIB_OUT)
@rm -f $@
$(file >$@.in) $(foreach O,$^,$(file >>$@.in,"$O"))
@$(LEAN_AR) rcs $@ @$@.in
@rm -f $@.in
else
$(LIB_OUT)/$(STATIC_LIB_NAME): $(addprefix $(TEMP_OUT)/,$(REL_OS)) | $(LIB_OUT)
@rm -f $@
# no response file support on macOS, but also no need for them
@$(LEAN_AR) rcs $@ $^
endif
clean:
rm -rf $(OUT)

9
stage0/src/lean.mk.in generated
View file

@ -123,9 +123,18 @@ else
$(LEANC) -o "$@" $^ $(LEANC_OPTS) $(LINK_OPTS)
endif
ifeq (@CMAKE_SYSTEM_NAME@, Windows)
$(LIB_OUT)/$(STATIC_LIB_NAME): $(addprefix $(TEMP_OUT)/,$(REL_OS)) | $(LIB_OUT)
@rm -f $@
$(file >$@.in) $(foreach O,$^,$(file >>$@.in,"$O"))
@$(LEAN_AR) rcs $@ @$@.in
@rm -f $@.in
else
$(LIB_OUT)/$(STATIC_LIB_NAME): $(addprefix $(TEMP_OUT)/,$(REL_OS)) | $(LIB_OUT)
@rm -f $@
# no response file support on macOS, but also no need for them
@$(LEAN_AR) rcs $@ $^
endif
clean:
rm -rf $(OUT)