Hi! Ohh! Yes please, that'll be very helpful for our experiments. Thank you so much.
Regards On Mon, Apr 11, 2022, 2:50 PM Than McIntosh <th...@google.com> wrote: > Hello, > > At the moment gollvm doesn't support anything like the "-Xclang -load > -Xclang ...". > > It would not be too hard to add this though. Want to send a patch? > > Thanks, Than > > > On Sun, Apr 10, 2022 at 3:47 PM Balamurugan Marimuthu <balamu...@gmail.com> > wrote: > >> Yes, something like that! I basically want to run my custom pass as I >> compile using 'go build' >> >> But looks like llvm-goc doesn't support the -Xclang option >> >> >> >> >> *$ go build -gccgoflags="-Xclang -load -Xclang >> ../passes/FunctionInsertPass.so" cache_main.go# >> command-line-arguments/gollvm/install/bin/llvm-goc: error: unrecognized >> command line option '-Xclang'/gollvm/install/bin/llvm-goc: error: >> unrecognized command line option '-Xclang'* >> >> Is there a way to load my custom pass as part of 'go build'? >> >> Thanks! >> >> On Sunday, April 10, 2022 at 12:14:34 AM UTC-4 Ian Lance Taylor wrote: >> >>> On Sat, Apr 9, 2022 at 8:28 PM Balamurugan Marimuthu >>> <bala...@gmail.com> wrote: >>> > >>> > I see I can invoke the following and see the steps 'go build' is >>> doing. >>> > >>> > % go build -work -x mypackage.go 1> transcript.txt 2>&1 >>> > >>> > I struggle to understand how can I load my custom pass created as a >>> shared library? >>> > >>> > I was looking for something like this which is done with Clang: >>> > clang -Xclang -load -Xclang build/skeleton/libSkeletonPass.* >>> something.c >>> > >>> > Is my understanding correct? Any help/pointers will be really helpful. >>> >>> Perhaps you are looking for something like >>> >>> go build -gccgoflags="-Xclang -load -Xclang >>> build/skeleton/libSkeletonPass.*" >>> >>> Ian >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/9a976aca-4c5d-4074-a19d-f843e8b5ca63n%40googlegroups.com >> <https://groups.google.com/d/msgid/golang-nuts/9a976aca-4c5d-4074-a19d-f843e8b5ca63n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABFwZMqVy-0GiV1Qa9%2BNqAYs-fU1tW_1f79VgvkMwkHfnEiPQA%40mail.gmail.com.