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

Factor librustc_target from rustc into a standalone library #1053

Open
sunfishcode opened this issue Sep 25, 2018 · 0 comments
Open

Factor librustc_target from rustc into a standalone library #1053

sunfishcode opened this issue Sep 25, 2018 · 0 comments
Labels
cranelift:E-compiler-design Open-ended compiler design issues. cranelift:goal:native-ABI Focus area: Interoperate with native platform ABIs and calling conventions. cranelift Issues related to the Cranelift code generator

Comments

@sunfishcode
Copy link
Member

librustc_target is a library in rustc for implementing a lot of native ABI and toolchain logic. It has some overlap with target-lexicon, however it provides much more extensive features, especially including knowledge of calling conventions. It's written in a way which is mostly independent from the rest of rustc, so it's an interesting candidate for factoring out into a standalone library that Cranelift users and others could use to more easily integrate with native C ABI/toolchain environments.

This aligns fairly well with cranelift-codegen's rough design for calling conventions, in which it only does the lowest-level parts, and assumes that cranelift-frontend or other libraries will be the place for offering higher-level functionality such as handling struct types.

See this comment for some more details on librustc_target.

This library isn't Cranelift-specific, as other projects could make use of such a library too. That said, it is particularly interesting for use with Cranelift, so I'm posting an issue here so we can track it.

@alexcrichton alexcrichton transferred this issue from bytecodealliance/cranelift Feb 28, 2020
@alexcrichton alexcrichton added cranelift:E-compiler-design Open-ended compiler design issues. cranelift:goal:native-ABI Focus area: Interoperate with native platform ABIs and calling conventions. cranelift Issues related to the Cranelift code generator labels Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:E-compiler-design Open-ended compiler design issues. cranelift:goal:native-ABI Focus area: Interoperate with native platform ABIs and calling conventions. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

2 participants