Skip to content

feat(elfpatch): add macOS Mach-O patch support#7

Merged
Sunrisepeak merged 3 commits intomainfrom
feat/elfpatch-macos
Mar 7, 2026
Merged

feat(elfpatch): add macOS Mach-O patch support#7
Sunrisepeak merged 3 commits intomainfrom
feat/elfpatch-macos

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

  • add a Mach-O branch to elfpatch.lua so macOS packages can add rpaths and rewrite non-system dylib references
  • preserve Linux ELF patching and Windows no-op behavior while keeping the Lua stdlib embedding in sync
  • extend executor and loader tests to cover Linux, macOS, Windows, failure handling, and xmake-injected pkgindex paths

Test plan

  • xmake run xpkg_model_test
  • xmake run xpkg_loader_test
  • xmake run xpkg_index_test
  • xmake run xpkg_executor_test

Support Mach-O binaries in the Lua elfpatch helper so packages can add rpaths and rewrite dylib references on macOS while cleanly skipping unsupported Windows flows.
Keep Mach-O patch results honest when install_name_tool fails and lock in Linux and macOS regression coverage for the platform-specific patch flows.
Keep loader tests portable with xmake-injected absolute paths so the full test suite stays green before release and index updates.
@Sunrisepeak Sunrisepeak merged commit a43a7e9 into main Mar 7, 2026
1 of 3 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/elfpatch-macos branch March 7, 2026 11:26
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