chore: pin libyulc 0.0.2 (solc 339 MiB -> 144 MiB) - #2
Merged
Conversation
0.0.1 predated the Mathlib work in yul-compiler. Mathlib was being linked into the library because every Lean module's initializer references the initializer of each module it imports, so a single bare `import Mathlib` in the runtime closure pulled all of compiled Mathlib in. Narrowing those imports (powdr-labs/yul-compiler#137, argotorg#138 and powdr-labs/yul-semantics#40) took the link closure from 8,724 objects to 1,112. Measured on this branch, rebuilding solc against each release: 0.0.1 0.0.2 delta solc 355,502,216 219,069,328 -136.4 MB solc, stripped 236,446,528 151,078,184 -85.4 MB .text 185,199,409 121,448,177 -63.8 MB defined symbols 1,001,102 570,826 -430k Both binaries compile the block- and object-rooted test inputs to byte-identical bytecode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumps the pinned libyulc release from
0.0.1to0.0.2. Two lines incmake/yulc.cmake.Follow-up to #1, which merged just before this landed on that branch, so
developcurrently pins0.0.1and does not have the size reduction below.Why
0.0.1predated the Mathlib work in yul-compiler. Mathlib was being linked into the library because every Lean module's initializer references the initializer of each module it imports — a real symbol reference the linker cannot discard — so a single bareimport Mathlibanywhere in the runtime closure pulled in all of compiled Mathlib. Narrowing those imports (powdr-labs/yul-compiler#137, powdr-labs/yul-compiler#138, powdr-labs/yul-semantics#40, all merged) took the link closure from 8,724 objects to 1,112.libyulc-v0.0.2is cut from yul-compilermainwith that in.Measured
Rebuilt solc against each release, same tree, same flags:
solc(USE_YULC=ON)solc(+ SOLC_STRIP_SYMBOLS=ON).text.eh_frame.rodataSo
-DUSE_YULC=ON -DSOLC_STRIP_SYMBOLS=ONnow costs 144.1 MiB against a 19.4 MiB baseline solc, where #1 as merged costs 339.0 MiB.Both binaries compile the block-rooted and object-rooted test inputs to byte-identical bytecode:
The
USE_YULC=OFFdefault build is untouched by this.Notes
libyulc.so198 MB → 79.8 MB, butlibyulc.ais 759 MB, marginally larger. Expected:build-c-lib.sharchives every object under each package'sbuild/ir, so Mathlib's objects are still in the archive — just no longer referenced, so the linker no longer pulls them.-UYULC_VERSION -UYULC_RELEASE_SHA256 -UYULC_LIBRARY -UYULC_HEADER.🤖 Generated with Claude Code