[LLVMdev] BuildMode

Reid Spencer rspencer at reidspencer.com
Tue Jun 26 13:29:32 PDT 2007


Hi David,

On Tue, 2007-06-26 at 15:05 -0500, David Greene wrote:
> On Tuesday 26 June 2007 14:05, Reid Spencer wrote:
> 
> > I think you mis-interpreted something. 
> 
> That's not surprising.  :)
> 
> > If you build with -disable-assertions you are telling whatever build
> > mode (Debug or Release) to not include assertions. Consequently you get
> > either Release-Asserts (Release minus asserts) or Debug-Asserts (Debug
> > minus Asserts).
> 
> I was wondering if that's what it meant.

Yeah, that's the confusing part.

> 
> > I would appreciate it if you would not commit the changes you made or
> > you'll confuse a lot of us. Its already confusing enough.
> 
> Nope, I won't.  That's why I asked.  I'll change it back in my copy.

THanks.

> 
> 
> > Yeah, this appears to be bug in this rule. It shouldn't be using
> > $(AssertMode) there, just $(BuildMode). 
> 
> All right.  I'll clean that up.

Thanks.

> 
> > Furthermore, the ifeq directive 
> > needs to find "Debug" anywhere in $(BuildMode) not just if its equal to
> > "Build". That is, you want the warnings to occur when BuildMOde is
> > "Debug" or "Debug-Asserts" or "Debug+ExpensiveChecks" or any other
> > variant that includes "Debug".
> 
> Yep, I wondered about that too.  I'll fix it.

Thanks.

> 
> > As a side note, you are ADDING something to the build rather than
> > subtracting so please use + instead of - in your BuildMode for
> > --enable-expensive-checks. That is, when you add
> > --enable-expensive-checks, the BuildMode should be "Debug
> > +ExpensiveChecks" not "Debug-ExpensiveChecks".
> 
> Ok.  Is "ExpensiveChecks" a reasonable keyword for this?  I wanted something
> that could encompass other things people might want without creating 
> thousands of build combinations and 
> Debug+CxxLibChecks+BoundsChecking+ElectricFence+Even+More+
>   Things+That+Would+Create+Ridiculously+Long+Build+Names

Heh.

> 
> I wanted to keep things at least mostly sane.

I think its fine to group these things under one name. Although
"+Checks" would be fine with me. Its shorter and it goes along with
"-Asserts". Checks are generally understood to be expensive so
"+ExpensiveChecks" doesn't add much meaning.  

We can define "+Checks" to mean whatever we want. You included
CxxLibChecks, Bounds checking, and Electric Fence. There might be other
things as well. However, I think Electric Fence should be its own
option. That is *really* expensive and implies the availability of the
EF software, etc. But, its up to you. Do what you think is right :)

Reid. 


>                                              -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list