Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive output binaries for powerpc-linux-musl and riscv64-linux-musl #20945

Open
GalaxyShard opened this issue Aug 5, 2024 · 0 comments
Open
Labels
arch-powerpc 32-bit and 64-bit Power ISA arch-riscv 32-bit and 64-bit RISC-V backend-llvm The LLVM backend outputs an LLVM IR Module. optimization
Milestone

Comments

@GalaxyShard
Copy link

Zig Version

0.14.0-dev.829 2e26cf83c

Steps to Reproduce and Observed Behavior

Building my fork of zigup at commit 5dbe36f4ea80a21cb99ce27f6a903266a62cd1aa (current master) results in huge binary sizes on powerpc-linux-musl (61MB) and riscv64-linux-musl (85MB).

Other architectures (tested arm/aarch64/powerpc64le/x86_64) built with the same OS/ABI/libc range between 9.3MB and 11MB.

Compressing the files with gzip results in file sizes similar across all of the architectures I tested.

Repro:

git clone https://github.com/galaxyshard/zigup
cd zigup
git switch 5dbe36f4ea80a21cb99ce27f6a903266a62cd1aa

# very large binary
zig build -Dtarget=riscv64-linux-musl -Doptimize=ReleaseSafe
zig build -Dtarget=powerpc-linux-musl -Doptimize=ReleaseSafe
# much smaller
zig build -Dtarget=powerpc64le-linux-musl -Doptimize=ReleaseSafe
zig build -Dtarget=x86_64-linux-musl -Doptimize=ReleaseSafe
# build all of the archs & archive them
zig build ci

ls -Ralh --si ./zig-out

It looks like #18122 is related but no longer reproducible

Expected Behavior

Similar binary sizes between architectures

@GalaxyShard GalaxyShard added the bug Observed behavior contradicts documented or intended behavior label Aug 5, 2024
@andrewrk andrewrk added optimization arch-riscv 32-bit and 64-bit RISC-V arch-powerpc 32-bit and 64-bit Power ISA backend-llvm The LLVM backend outputs an LLVM IR Module. and removed bug Observed behavior contradicts documented or intended behavior labels Aug 12, 2024
@andrewrk andrewrk added this to the unplanned milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-powerpc 32-bit and 64-bit Power ISA arch-riscv 32-bit and 64-bit RISC-V backend-llvm The LLVM backend outputs an LLVM IR Module. optimization
Projects
None yet
Development

No branches or pull requests

2 participants