[llvm-dev] Contributing Bazel BUILD files similar to gn

Eric Christopher via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 29 22:58:59 PDT 2020


Hi Neil,

To try to elaborate more on what's been said:

cmake is the supported build system and it's what is used to build all llvm
projects. Anything else may also build llvm projects but won't be required
for them. There won't be any projects in the llvm tree that don't build
with cmake.

There is no change planned or proposed to change the default and supported
build system for llvm. I'd actually be quite strongly against that for a
few reasons - primarily that cmake as a meta build system allows us to meet
developers where they are in their development environments.

Relatedly gn and bazel would allow us to do that for a different set of
developers, but they don't have the reach or capability of cmake and I
don't expect them to.

Hope this is helpful and feel free to let me know if you have any other
questions :)

-eric






On Fri, Oct 30, 2020, 1:39 AM Neil Nelson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Some good remarks Stella.
>
> What does *second tier* mean?
>
> There are additional directories in the LLVM download such as flang,
> compiler-rt, openmp, but these do not seem to be second-tier though there
> may be a sense in which they are.
>
> Is the idea of second-tier that there will be additional directories or
> programs embedded in the existing LLVM directories not available for use to
> those without bazel? If that is the case, then what is the relevance of
> those contributions?
>
> It seems we are saying that if a contribution is relevant then either it
> is in the cmake build, making bazel superfluous to obtain a build, or it is
> in a bazel-only build. A cmake build would be required for the parts we
> have now and then an additional bazel build for the second-tier parts.
>
> There is talk of gn. I am not seeing gn installed here but am not aware it
> is required. Is it the case that whatever gn does, cmake does, or is it the
> case there is a necessary gn build sequence in LLVM somewhere?
>
> Neil Nelson
> On 10/29/20 10:22 PM, Stella Laurenzo via llvm-dev wrote:
>
> On to my note...
>
> One other cost to consider is that if we have this outside of the
> monorepo, and outside of the LLVM organization, we have a contribution
> barrier up which firmly entrenches this as a "Google thing", and I don't
> think that is a good thing for LLVM as a project... There will be a
> different committer pool, different policy enforcement (such as accepting
> Google's CLA), different comms channels, etc. Projects, both OSS and
> private, outside of Google do use both bazel and LLVM, and it would be
> best, in my opinion, if they could source and contribute all of the LLVM
> bits from the LLVM org, including second tier build support, where it
> exists (and we should clearly cordone this off as some kind of second tier).
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201030/6f94e249/attachment.html>


More information about the llvm-dev mailing list