linkers: basic support for the 'zig cc' linker by Akaricchi · Pull Request #1229...
source link: https://github.com/mesonbuild/meson/pull/12293
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Contributor
Zig has a C/C++ compiler frontend that may be useful for cross-compiling. The compiler presents as clang (because it actually is), but since zig 0.11.0 the linker reports itself as zig ld
, which confuses meson. It seems mostly compatible with lld, except lacking support for --thinlto-cache-dir
(for now?).
I haven't tested this too thoroughly, but I was able to build the latest Taisei with this patch and a trivial cross file, for linux and windows.
Contributor
Mind adding a release notes snippet? Just something simple with an example on how to us it would be good enough |
Contributor
Author
I'll add a release snippet but I'm sure if a usage example is necessary. You use it like any other compiler; |
Member
Previously, #11918 This PR seems to be better as it resolves an outstanding review comment from that PR about adding a unique linker class, and even smooths over some incompatibilities. ;) I would still like to see zig installed in CI and tested, in addition to the release notes. Please also see the comment there about -fuse-ld. |
Contributor
You can squash the commits. Thanks! |
Contributor
Author
Now that I think about it, the linker id should probably be |
Contributor
Author
@eli-schwartz |
Contributor
Author
Some of the comments in the other PR seem inaccurate.
There's no error or even a warning; as I said above,
|
Member
I might be working on that. For the moment Zig looks more like Rust, generating a final output directly. Like Rust it can compile object files but getting Meson to the point it does that will be non-trivial. I would prefer that the linker be called someting other than just |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No one assigned
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK