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

lib/std/Build.zig: add standard linkage option #23239

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RossComputerGuy
Copy link
Contributor

Adds a standardLinkageOption to the builder API. It's pretty handy if this was standardized.

@alexrp
Copy link
Member

alexrp commented Mar 18, 2025

This seems useful enough to justify its existence to me.

However, it's going to take a lot of effort to make all existing projects adopt it. This is a problem we'll keep running into as we add more standard options. Maybe it's time to bundle them all into a single b.standardOptions() function that optimizes for the overwhelmingly common case where the user wants all of them?

@RossComputerGuy
Copy link
Contributor Author

Yeah, I think a gradual shift to a standardOptions function would be best but we also have the standalone ones in case projects need more granular control. I also wonder if the zig compiler itself could make use of some of this logic to determine whether to default to static or dynamic linking if we move some stuff to std.Target.

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.

2 participants