Skip to content

fix(build): musl legs drop llvm-inprocess for a pure-static link (#7353) - #9

Merged
andilv merged 1 commit into
mainfrom
fix/musl-static-link-llvm-inprocess
Aug 11, 2026
Merged

fix(build): musl legs drop llvm-inprocess for a pure-static link (#7353)#9
andilv merged 1 commit into
mainfrom
fix/musl-static-link-llvm-inprocess

Conversation

@andilv

@andilv andilv commented Aug 11, 2026

Copy link
Copy Markdown
Owner

The musl release/manual-build legs could not statically link the glibc-built in-process LLVM: versioned refs (_isoc23*@@GLIBC_2.38) and -lz3/-lxml2/-lffi system libs neither link into musl, and a forced link yields a musl+glibc hybrid that segfaults at startup.

  • perry: perry-codegen no longer uses workspace = true (cargo ignores default-features = false on inherited deps); llvm-inprocess is now opt-in via default instead of perry-codegen's default feature
  • workflows: musl legs build --no-default-features --features full-cli and a new Verify step asserts the binary is fully static (no INTERP)
  • .cargo/config.toml: per-target rustflags prepend the musl libc.a dir (build-script -L dirs won glibc's libc.a) and disable fortify for musl C compiles (__memcpy_chk missing in musl on aarch64)

Musl binaries now shell out to LLVM tools (opt/llc) at compile time, like pre-PerryTS#7353 builds.

Summary

Changes

Related issue

Test plan

  • cargo build --release clean
  • cargo test --workspace --exclude perry-ui-ios --exclude perry-ui-tvos --exclude perry-ui-watchos --exclude perry-ui-gtk4 --exclude perry-ui-android --exclude perry-ui-windows passes
  • (if user-facing) Added or updated a test under test-files/ or a #[test] in the affected crate
  • (if CLI / stdlib / runtime API changed) Updated docs/src/
  • (if touching a platform UI backend) Built -p perry-ui-<backend> locally on that platform

Screenshots / output

Checklist

  • I have NOT bumped the workspace version or edited CLAUDE.md / CHANGELOG.md (maintainer handles these at merge)
  • My commits follow the loose feat: / fix: / docs: / chore: prefix convention used in the log
  • I've read CONTRIBUTING.md and agree to the Code of Conduct

…ryTS#7353)

The musl release/manual-build legs could not statically link the
glibc-built in-process LLVM: versioned refs (__isoc23_*@@GLIBC_2.38)
and -lz3/-lxml2/-lffi system libs neither link into musl, and a forced
link yields a musl+glibc hybrid that segfaults at startup.

- perry: perry-codegen no longer uses workspace = true (cargo ignores
  default-features = false on inherited deps); llvm-inprocess is now
  opt-in via default instead of perry-codegen's default feature
- workflows: musl legs build --no-default-features --features full-cli
  and a new Verify step asserts the binary is fully static (no INTERP)
- .cargo/config.toml: per-target rustflags prepend the musl libc.a dir
  (build-script -L dirs won glibc's libc.a) and disable fortify for
  musl C compiles (__memcpy_chk missing in musl on aarch64)

Musl binaries now shell out to LLVM tools (opt/llc) at compile time,
like pre-PerryTS#7353 builds.
@andilv
andilv merged commit cfb89bf into main Aug 11, 2026
36 of 61 checks passed
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.

1 participant