[Mesa-dev] LLVM_CFLAGS

Corbin Simpson mostawesomedude at gmail.com
Mon Dec 6 09:58:11 PST 2010

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)
>>> endif
>>> ?
>>> This effectively adds the LLVM cflags to gcc compiles if LLVM is
>>> One
>>> side-effect of this is to include -O3 optimization no matter what,
>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20101206/ac098882/attachment.htm>

More information about the mesa-dev mailing list