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

build samurai with Cosmopolitan Libc #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahgamut
Copy link

@ahgamut ahgamut commented Apr 22, 2024

This PR adds a Github Action to build samu with Cosmopolitan Libc (cc @jart) when a new tag/release is created.

The result of the action is samu.zip, that contains samu.com, a fat binary that works on x86_64/aarch64, and debug ELF binaries. You can see it here: https://github.com/ahgamut/samurai/releases/tag/untagged-c654d227e531f9e3235f (edit: https://github.com/ahgamut/samurai/releases/tag/1.2-cosmo)

@eli-schwartz
Copy link

This seems like a rather large amount of effort to go to just for a non-portable binary that only runs on two of the most common Linux arches. Isn't the whole point of cosmopolitan libc to be, well, portable anywhere?

Would be more impressive if it actually lived up to its name.

@jart
Copy link

jart commented Apr 22, 2024

@ahgamut Is it possible to build this project using just cosmocc -O -o samurai *.c *.cc?

@ahgamut ahgamut force-pushed the cosmo-build branch 2 times, most recently from 62fed50 to 2f81db0 Compare April 22, 2024 19:03
@ahgamut
Copy link
Author

ahgamut commented Apr 22, 2024

Ok, now it builds with just cosmocc, and the built binary samu should work on x86_64 (Linux/BSDs/Windows/MacOS) and aarch64 (Linux/MacOS).

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.

3 participants