[LLVMdev] dragonegg plugin invoking issue

Duncan Sands
Thu, 09 Sep 2010 17:40:56 -0000

Hi Rehman, if I understand right the plugin works fine if you compile it with
-fvisibility=hidden, and replace LLVM_GLOBAL_VISIBILITY in llvm-backend.cpp
with __attribute__ ((visibility("default"))).  Since
LLVM_GLOBAL_VISIBILITY
is a macro that expands to __attribute__ ((visibility("default"))) if
you
are not on mingw32 or cygwin, and your gcc version is at least 4, that
suggests that you are compiling the plugin with gcc 3.x.  Is that right?

Best wishes,

Duncan.

>
> Hi Duncan,
>
> Thank you for further looking into it.
>
> Indeed I made changes as you described and I was able to build, run and
compile
> the my test program.
>
> Regards,
> Rehman
>
>  > Date: Wed, 1 Sep 2010 15:15:32 +0200
>  > From: baldrick at free.fr
>  > To: rehman_saeed at live.com
>  > Subject: Re: [LLVMdev] dragonegg plugin invoking issue
>  >
>  > Hi Rehman,
>  >
>  > > >>Hi Rehman, does it work if you remove
-fvisibility=hidden from these two
> lines
>  > >
>  > > >>in the Makefile:
>  > >
>  > >> > CFLAGS+=-Wall $(shell $(LLVM_CONFIG) --cflags)
-fvisibility=hidden
>  > >
>  > >> > CXXFLAGS+=-Wall $(shell $(LLVM_CONFIG) --cxxflags)
-fvisibility=hidden
>  > >
>  > > >>?
>  > >
>  > >
>  > > I tried it with clean build and yes it did work when I remove
the
>  > > -fvisibility=hidden option
>  >
>  > if you restore the -fvisibility=hidden option and replace
LLVM_GLOBAL_VISIBILITY
>  > with __attribute__ ((visibility("default"))) everywhere in
llvm-backend.cpp,
>  > does it work?
>  >
>  > Ciao,
>  >
>  > Duncan.