[Mesa-dev] LLVM_CFLAGS

Bob Gleitsmann rjgleits at bellsouth.net
Mon Dec 6 10:27:56 PST 2010


There is an option --includefiles that returns the directory with the include 
files. It isn't prefixed by -I so that would have to be worked out. Is that all 
that is needed? Seems like it should be.

BG
On Monday, December 06, 2010 12:58:11 pm Corbin Simpson wrote:
> Isn't there a --cflags-only-I or something along those lines?
> 
> Sending from a mobile, pardon the brevity. ~ C.
> 
> On Dec 6, 2010 9:42 AM, "Dan Nicholson" <dbn.lists at gmail.com> wrote:
> > On Mon, Dec 6, 2010 at 9:15 AM, Brian Paul <brianp at vmware.com> wrote:
> >> 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?
> > 
> > I think the question is, what else is in llvm-config --cflags? If all
> > that's needed is the include paths, then --cppflags would be
> > sufficient. However, if there are macro definitions or compiler flags
> > (e.g. -fomit-frame-pointer) in --cflags that are needed to properly
> > use llvm, then I guess you need --cflags. This is really a bug in
> > llvm, but the last time someone here tried to bring it up to the llvm
> > people, it was dismissed. Here's that bug:
> > 
> > http://llvm.org/bugs/show_bug.cgi?id=8220
> > 
> > There's some more in the mesa archives, but I can't find the thread
> > now. Sadly, that bug became a discussion about pkg-config which was
> > not what was intended.
> > 
> > --
> > Dan
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list