[Mesa-dev] LLVM_CFLAGS

Brian Paul brianp at vmware.com
Mon Dec 6 09:15:03 PST 2010


On 12/05/2010 02:06 AM, Bob Gleitsmann wrote:
> Hello,
>
> Can someone explain the value of including this in
> mesa/src/gallium/Makefile.template:
>
> ifeq ($(MESA_LLVM),1)
> LIBRARY_DEFINES += $(LLVM_CFLAGS)
> endif
>
> ?
> This effectively adds the LLVM cflags to gcc compiles if LLVM is enabled. One
> side-effect of this is to include -O3 optimization no matter what, making
> debugging very difficult. Removing it seems to have no catastrophic effects (or
> even detectable ones).
> But maybe I am missing something.

We need some of the LLVM C flags to get the -I path for headers, for 
example.

I think we should use llvm-config --cppflags instead of --cflags.

If you're using autoconf, try changing this line:

	LLVM_CFLAGS=`$LLVM_CONFIG --cflags`

in configure.ac to use --cppflags instead.  Does that help?

-Brian


More information about the mesa-dev mailing list