Skip to content
/ lipo Public

This lipo is designed to be compatible with macOS lipo, written in golang.

License

Notifications You must be signed in to change notification settings

konoui/lipo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

64989b9 · Jan 21, 2025
Dec 20, 2024
May 22, 2024
Apr 7, 2022
Jan 6, 2025
May 28, 2024
Dec 12, 2024
Sep 20, 2022
Dec 12, 2024
Jan 21, 2025
Dec 12, 2024
Jan 27, 2023
Oct 7, 2022
May 5, 2024
May 5, 2024

Repository files navigation

LIPO

This lipo is designed to be compatible with macOS lipo, which is a utility for creating Universal Binary as known as Fat Binary.

This can be useful in the following scenarios:

  • When using a CI/CD platform (such as GitLab) that does not provide access to macOS or macOS lipo.
  • When using GitHub Actions and looking for a cost-effective solution that doesn't involve using macOS.

Distro Packages

Packaging status

Nix

You can try lipo from the nixpkgs by:

nix-shell --packages lipo-go

INSTALL

For example for Linux on amd64,

$ curl -L -o /tmp/lipo https://github.com/konoui/lipo/releases/latest/download/lipo_Linux_amd64
$ chmod +x /tmp/lipo
$ sudo mv /tmp/lipo /usr/local/bin

Install with go install

$ go install github.com/konoui/lipo@latest

USAGE

$ lipo -output <output-binary> -create <arm64-binary> <amd64-binary>

For example,

$ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o amd64 example/main.go
$ CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o arm64 example/main.go
$ lipo -output hello-world -create arm64 amd64
$ ./hello-world
Hello World

$ file hello-world
hello-world: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
hello-world (for architecture x86_64): Mach-O 64-bit executable x86_64
hello-world (for architecture arm64): Mach-O 64-bit executable arm64

Supported Options

-archs, -create, -extract, -extract_family, -output, -remove, -replace, -segalign, -thin, -verify_arch, -arch, -info, -detailed_info, -hideARM64, -fat64

Please run the -help command for more details.

$ lipo -help