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

Use zig cc as the cross compiler #544

Open
mauri870 opened this issue Mar 11, 2025 · 0 comments
Open

Use zig cc as the cross compiler #544

mauri870 opened this issue Mar 11, 2025 · 0 comments

Comments

@mauri870
Copy link
Member

mauri870 commented Mar 11, 2025

Zig cc is a drop-in C compiler that is part of the Zig project. It can serve as a replacement for GCC or Clang, simplifying cross-compilation by eliminating the need for a full compiler suite and dedicated cross-compilation toolchains. This can make the process more streamlined and result in smaller container images.

More details at https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html.

I think it is worth experimenting with it and see if we can get any real benefit. It should be as simple as installing zig in the images and using the right triplet in CC='zig cc -target aarch64-linux-gnu' CXX='zig c++ -target aarch64-linux-gnu'.

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

No branches or pull requests

1 participant