-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Added clarifying comment to 'LLVMLinkInMCJIT' and 'LLVMLinkInInterpreter' #92467
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
36f3f90
to
697b826
Compare
@bob-wilson Review and merge would be appreciated :) |
I'm not the right person to do that. I don't regularly work on LLVM and don't even have write access at this point. |
@lhames I'm looking for a reviewer with write access |
@Minding000 I assume you're not seeing any bugs from this, you just want to document that these are noops when linking against LLVM shared libraries? Documenting that they're no-ops seems ok, but we could also give them hidden visibility so that they just don't show up in the dylib interface at all. The only drawback there would be for people who want to switch back and forward between dylib and archive builds of LLVM: they'd have to conditionalize their calls to |
@lhames Yes, there are no bugs, just confusion. I like the idea of hiding these functions in the dylib interface, as they don't serve a purpose there, but I don't know how to do that. I'm open to commits or hints though. I guess it depends on how common the usecase of switching between static and dynamic libraries is. To me it sounds like a niche usecase and the workaround is pretty humane. But for these cases this would be a breaking change. |
697b826
to
d0cb5b2
Compare
@lhames I changed the visibility to hidden. Feel free to merge if it looks good to you |
Hi @Minding000. Sorry that I did not respond to your message earlier! On reflection I think we should go with your original solution and just document the existing behavior: These functions are going to be deprecated and removed in the not too distant future anyway, at which point the problem goes away. In the mean time hiding them from the dylib interface would require clients to call them conditionally based on how they're linking LLVM, which seems like it'll be more error-prone (e.g. when people copy/paste example code they find that assumes dynamic linking). If you're happy to restore your original comments I can go ahead and merge them. Sorry for the run-around! |
@lhames No worries. I wasn't aware the functions were going to be deprecated. I reverted back to comments now - feel free to merge. |
Issue
LLVMLinkInMCJIT
andLLVMLinkInInterpreter
is not obvious (especially when using a pre-built library)Changes
LLVMLinkInMCJIT
andLLVMLinkInInterpreter