Skip to content

Use UPX filters when committing SDK package updates - #70

Merged
dscho merged 3 commits into
mainfrom
upx-workflow-integration
Nov 4, 2026
Merged

dscho merged 3 commits into
mainfrom
upx-workflow-integration

Conversation

@mjcheetham

@mjcheetham mjcheetham commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Prepare package-update automation to store Rust's LLVM DLL through the UPX clean filter, preserving original package bytes in the working tree.

  • Configure repository-local filters before staging in .github/commit-sdk.sh, using --no-refresh.
  • Stop before staging if filter setup fails.
  • Select only clangarm64/bin/libLLVM-22.dll with filter=upx.
  • Remove sync's oversized-DLL stripping workaround, including its temporary installation and removal of x64 LLVM.

UPX now supports Windows ARM64 binaries, allowing explicitly selected LLVM DLLs to use compressed storage without stripping package files.

Ordinary clones retain runnable packed binaries. Users can optionally enable smudge filtering to trade disk space for faster loading.

Dependencies and follow-ups

Depends on #69; its commits appear here until that PR is merged.

This does not install Rust or LLVM. Updating the package-install workflow on Rust PR #67 is a follow-up. No installation workflow has been dispatched.

Validation

Disposable repository tests verified setup runs before staging, successful commits leave working-tree bytes unchanged, and setup failure prevents staging and committing.

Attribute checks confirmed only the intended LLVM DLL is selected. Actionlint, shell syntax, and whitespace checks passed. Native ARM64 filter execution has not been tested locally.

@mjcheetham

Copy link
Copy Markdown
Member Author

Corresponding x86_64 PR: git-for-windows#137

@mjcheetham
mjcheetham force-pushed the upx-workflow-integration branch from f334d40 to 6e8a72a Compare November 3, 2026 11:30
Package-update jobs must configure the local UPX driver before staging
files selected by filter=upx attributes. Otherwise Git can stage the
original unpacked binaries instead of their compressed representation.

Run the setup helper in configuration-only mode before git add, and
stop if setup fails. Leave working-tree files untouched: package
updates need clean filtering during staging, not a smudge refresh of
the checkout.

This prepares the shared commit helper for targeted LLVM attributes
when Rust's LLVM binaries are introduced; it does not select any new
files for compression.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
UPX now supports Windows ARM64 binaries, so the workaround of
installing x64 LLVM solely to strip oversized DLLs is no longer
needed.

Keep package-provided DLLs intact in the working tree. Compressed
storage should use the clean filter for explicitly attributed LLVM
binaries, rather than modifying every file above a size threshold.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Rust's LLVM library needs compressed storage to fit remote file-size
limits. Select that DLL explicitly for UPX clean/smudge filtering,
leaving unrelated binaries untouched.

Package-update automation configures the driver before staging, so
original package bytes can remain in the working tree while Git
stores the packed representation. Ordinary clones retain runnable
packed binaries; users can opt in to unpacking after checkout.

Add the attribute before introducing the package so its first
generated commit stores the DLL through the clean filter.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham
mjcheetham force-pushed the upx-workflow-integration branch from 6e8a72a to 8a8d3ca Compare November 4, 2026 14:14
@mjcheetham
mjcheetham marked this pull request as ready for review November 4, 2026 14:15
@mjcheetham
mjcheetham requested a review from dscho November 4, 2026 14:16

@dscho dscho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I really like how the llvm-strip hack can now be retired.

@dscho
dscho merged commit f28cb43 into main Nov 4, 2026
22 checks passed
@dscho
dscho deleted the upx-workflow-integration branch November 4, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants