[llvm-dev] wasteful cmake defaults

Tom Stellard via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 20 15:33:08 PST 2020


On 11/20/20 3:16 PM, Mehdi AMINI wrote:
> 
> 
> On Fri, Nov 20, 2020 at 12:05 PM Tom Stellard via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 
>     On 11/20/20 2:44 PM, Michael Kruse via llvm-dev wrote:
>      > Am Fr., 20. Nov. 2020 um 13:23 Uhr schrieb Philip Reames via llvm-dev
>      > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>:
>      >> Personally, I think we should either a) change the defaults or
>     b) put a prominent warning in the docs.
>      >
>      > https://llvm.org/docs/GettingStarted.html#common-problems
>      >
>      > Should it be more prominent?
>      >
> 
>     I don't think having this documented is all that helpful.  I know that
>     when I build a new project, if I see it has cmake, I just do cmake -G
>     Ninja && ninja and don't bother reading the docs.
> 
>     I think it would make the most sense to change the default to be
>     Release+Asserts, because this is the most likely configuration to work
>     on the average system.
> 
> 
> Can you expand on why release+asserts and not just release?
> I can imagine folks just wanting to try clang out of the box and finding 
> it "slow" because they don't know that assertions have to be disabled 
> explicitly for example.
> Of course developers have to opt-in assertions, but they also have to 
> think about opting in Debug info and sanitizers.
> 

The reason I prefer enabling asserts is because it gives you better 
information when something goes wrong, and I think this can be helpful 
for new users.  But this is just a slight preference, I would support 
either Release+Asserts or Release as the default.

-Tom

> -- 
> Mehdi
> 
> 
>     -Tom
> 
>      > Michael
>      > _______________________________________________
>      > LLVM Developers mailing list
>      > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>      > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>      >
> 
>     _______________________________________________
>     LLVM Developers mailing list
>     llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> 



More information about the llvm-dev mailing list