From 01c2342e18b104d47b1b72758cd8737a5900da92 Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 18 Jul 2022 00:55:02 +0200 Subject: [PATCH] Create archives in chunks to allow for very long lists of members. --- plat/build.lua | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/plat/build.lua b/plat/build.lua index 017628abe..a6f9e7a59 100644 --- a/plat/build.lua +++ b/plat/build.lua @@ -48,6 +48,27 @@ definerule("acklibrary", }, function (e) local em = (e.vars.plat or ""):find("^em") + + local commands = { + "rm -f %{outs[1]}", + } + local t = {} + local function flush() + commands[#commands+1] = + "ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} ".. + asstring(t) + t = {} + end + for _, target in ipairs(filenamesof(e.srcs)) do + t[#t+1] = target + if #t == 100 then + flush() + end + end + if #t ~= 0 then + flush() + end + return clibrary { name = e.name, srcs = e.srcs, @@ -58,10 +79,7 @@ definerule("acklibrary", }, _cfile = ackfile, suffix = em and ".m" or ".o", - commands = { - "rm -f %{outs[1]}", - "ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} %{ins}" - } + commands = commands } end )