[llvm-dev] wasteful cmake defaults

Luke Drummond via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 18 04:13:23 PST 2020


On Tue Nov 17, 2020 at 7:25 PM GMT, David Blaikie wrote:

> I don't think the current state of things suggests that it's not a
> valid use case to call cmake without a build type - the question is
> what users are we targeting for that use case? Is it new developers to
> the project? New CI configurations? etc.
>
> I believe historically it's been setup for new developers - debug
> info, assertions enabled (I think?), etc.
>
> CI configurations are likely more deliberately chosen for long-term
> deployment and balancing a variety of tradeoffs, so I don't think
> tailoring the default to that audience is high value compared to other
> audiences/users.
>
Good points. I guess without data on who builds llvm for what reason,
we can't really make informed choices. I personally think that if you're
setting yourself up for development on llvm itself, you're in for the
long haul anyway, so a rebuild because you forgot
-DCMAKE_BUILD_TYPE=Debug is no sweat. However, if you just want to
install a compiler from source, the total cost of installing and running
a debug build ends up being significantly higher when you miss that
flag. If we *are* going to override cmake's behaviour and set a default,
I think a Release build will be better for the
broader-than-llvm-developer user base and we should upgrade this message
to a warning while we're at it.

All the Best

Luke

-- 
Codeplay Software Ltd.
Company registered in England and Wales, number: 04567874
Registered office: Regent House, 316 Beulah Hill, London, SE19 3HF


More information about the llvm-dev mailing list