-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
opt can't load pass #176
Comments
By default, LLVM will build shared libraries. Pre-build packages usually come with statically linked libraries. Your problem seems to be that you have the static initializer of the debug-pass flag run twice. I guess it is because of the shared vs statically linkage of llvm libraries. You can either tell your your source llvm to link everything statically or you update your build process of the pass. I imagine |
Thanks for your reply. The error message appears even when I try to build my pass in a completely new docker container. I will try the former solution first. However, regarding to the binary file size of the output pass, I really want to have dynamic linkage. As for latter solution, do you mean that some of the flags in comes from |
I rebuild LLVM with |
what is the output of |
Following is the output of
After several attempt yesterday, I consider I make some progress. I guess the root cause of the issue may come from how I register the pass. I attach the simplified implementation of my pass as below for reference.
After I read the blog, I switch how I register the pass and error message disappear. I copy the code snippet in the blog below. Thus I would try to use modern PassManager to register my pass and try to load it with
|
I think I solve the opt loading issue and I refer to the video and the repo. I confirm that I should use the newer version pass register and load it with corresponding command line option. Thanks you @jdoerfert. I'll close the issue feel free to reopen it if you think it's necessary. |
…224.4 (llvm#176) [objwriter/12.x] Update dependencies from dotnet/arcade
Replace argument operands with instructions.
[flang][OpenMP] Make FlangRuntime offload use builtins vs. libc
Hi I was trying to build LLVM from source and I already tried
llvmorg-10.0.0-rc3
andllvmorg-11-init
two versions. Previously the LLVM tool I used was installed from ubuntu apt package tool and my code works very well with it. However, when I switch to theopt
that was built from source, it always output following error message. I am pretty sure the issue doesn't come from the loaded pass shared object file itself becauseopt
prints same error after I load the HelloPass from the tutorial.I simply follow the instructions from the official website. Here's how I build LLVM.
After some searching on Google, I doubt the issue comes from version conflict. Yet
opt
outputs the same message when I remove all of other version on my server. Thanks for your help and please let me know if the further information is needed.Referring to these two similar issues,
I think it's necessary to show how I compile the Pass source code and input it into
opt
.The text was updated successfully, but these errors were encountered: