I'm trying to run some passes on my go applications. By digging in some other threads I could manage some steps, here is how far I got:
First, I use llgo to emit bitcode:
llgo -S -emit-llvm source.go -o source.bc
Then, I run my pass using opt command:
opt -load libPass.so source.bc -pass -o source.pass
Running the source.pass using lli throws
'main' function not found in module.
I believe this is a linking issue, so my question is what should I link with the binary and how?
Thanks!
Mohsen
Thanks!
Mohsen
--
You received this message because you are subscribed to the Google Groups "llgo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to llgo-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
this is exaclty what I am trying to do. creating bitcode to then run passes on it. When I run
llgo -S -emit-llvm source.go -o source.bc
and then use llc or opt or any program to process the .bc file I get the error mentioned by Andrew.
Could you find any solution to the problem?
Best,
Tobias