-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add binary_format
to rustc target specs
#135724
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hey, Do I need to add a new field in |
Yes. You need to create a new field in the target with the binary format (create a new enum for this, don't use the one from the object crate). You will need to do a few other things as well but you may be able to figure that out from test failures and other code in the area. To populate them for existing targets, you can find the existing logic where I linked it. |
For the new enum, should it contain all the enum variants from BinaryFormat(object crate) or just the ones given in the logic mentioned in the OP? To populate the existing targets, do I manually set the binary_format for each target in @rustbot claim |
You should manually populate it, since the target is exactly to stop having this function. And only add the variants that we actually need. |
Can the binary format be added to TargetOptions instead of Target since the logic is also based on TargetOptions? |
Yes, I'd say put it there. |
There are some places in rustc that need to know the binary format of the target (to generate object files). It would be good to have this as a property on the target spec to avoid needing to have ad-hoc logic for it.
See #135695 (comment)
The text was updated successfully, but these errors were encountered: