You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this patch we built trurl in `-dev` builds or when explicitly
requrested with `-trurl`. When building curl with `-zero`, trurl linked
libcurl statically, otherwise dynamically. The latter was barely working
with a bunch of half-baked and painful hacks, and the goal of these
builds was always to produce static binaries.
Rework this in this patch to build a second libcurl, specifically
configured to trurl, with a minimal set of option to enable all trurl
functionality, but not more. Then use this minimal libcurl to build
trurl, linking it statically.
The second, minimal libcurl build is quite fast (adding ~15-60 seconds
to jobs), and the statically build trurl is reasonably small (340 KB for
macOS ARM64). Small enough to distribute it alongside curl if we opt
doing so.
The minimal libcurl library itself is not distributed in the binary
package.
The minimal build is build without unity for small binary size.
Build time cost comparison:
Without unity: https://github.com/curl/curl-for-win/actions/runs/18807659190
With unity: https://github.com/curl/curl-for-win/actions/runs/18808071491
Size difference for macOS arm64 trurl binary:
Without unity: 338248 bytes
With unity: 372488 bytes
The condition to build trurl did not change: needs `-dev` or `-trurl`
option.
Ref: curl/trurl#375
0 commit comments