Skip to content

Add --no-upx and --no-compress flags#2409

Closed
andreybolonin wants to merge 2 commits into
php:mainfrom
andreybolonin:patch-1
Closed

Add --no-upx and --no-compress flags#2409
andreybolonin wants to merge 2 commits into
php:mainfrom
andreybolonin:patch-1

Conversation

@andreybolonin
Copy link
Copy Markdown

Description
Currently, developers can skip the UPX compression stage by setting the NO_COMPRESS=1 environment variable. However, this is not immediately obvious, and many users intuitively try to pass flags like --no-upx to the script. Since build-static.sh doesn't parse this argument, the flag is ignored, resulting in a 40-60 minute build time on ARM64/Apple Silicon.

This PR adds basic command-line argument parsing to build-static.sh. Passing --no-upx (or --no-compress) will automatically set NO_COMPRESS=1, making the developer experience much smoother and more intuitive.

Related Issue
Closes #2408

Signed-off-by: Andrey Bolonin <andreybolonin@users.noreply.github.com>
Signed-off-by: Andrey Bolonin <andreybolonin@users.noreply.github.com>
@andreybolonin andreybolonin changed the title Add --no-upx Add --no-upx and --no-compress flags May 13, 2026
@henderkes
Copy link
Copy Markdown
Contributor

This script will likely be deleted entirely somewhat soon (switch to static-php v3). For now, the NO_COMPRESS env variable has to do.

@henderkes henderkes closed this May 13, 2026
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.

Reliable way to disable UPX compression in static builds

2 participants