-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make it easy to attach LLVM attributes to Rust functions #15180
Comments
This should only be allowed on |
There should also be a feature gated way to inject LLVM bitcode, which is really useful in certain cases |
I think feature gates are for featues that we wish to eventually make it into the 'official' language, are they not? So it would not make sense to enable injection of LLVM bitcode, or it would not be possible to create a non-LLVM based rust compiler (not that I would expect that to happen any time soon, but it would be interesting to see a rustc that uses the GCC backend after the language reaches 1.0). |
This and inline IR should probably go via an RFC. |
Maybe codegen plugins are a more appropriate way to do this. I have a demo working on a Rust branch and it suits my use case well, because I want to set some attributes globally and others on specific functions. |
There aren't many of these attributes so I think we should just expose the ones that are useful for Rust. For example, there's already a |
Triage: no update specifically. |
It's unlikely that this would end up ever being stabilized because we don't want to tie ourselves so closely to LLVM, and we already export a good number of the useful attributes from LLVM. We can add more over time but a general mechanism to just forward everything through is pretty scary from a backwards-compatibility perspective, so I'm going to close this for now. Any missing attributes we're not using in LLVM can certainly have attributes added for them though! |
Purge of unwraps Removes unnecessary unwraps that I have overlooked in rust-lang#15101 ( fixes rust-lang#15176 )
Lots of good stuff there.
The text was updated successfully, but these errors were encountered: