[libc-dev] Bazel rules for libc and libcxx

Кирилл Забелин via libc-dev libc-dev at lists.llvm.org
Wed Nov 24 01:33:21 PST 2021


Hello, everybody

I have some questions regarding Bazel rules for llvm targets.
In our project we plan to build llvm-project via Bazel. Currently only
rules for clang, llvm, libunwind, lld and mlir are presented in the llvm
tree. But we also plan to build libc and libcxx targets via Bazel, the
rules for these targets aren't in llvm tree yet. As far as I know they
exist only in internal Google monorepo.

*So, my questions:*
* Are there any plans to add Bazel rules for libc and libcxx to the llvm
tree under llvm-projects/utils/bazel/llvm-project-overlay?
* And if they are, then is it an ongoing task or only plans for now? Are
there any thoughts on when such rules could become available?
* Or there aren't such plans? Or they wound't be implemented soon and we
better start writing these rules by ourselves?

>From the short discussion in github here -
https://github.com/llvm/llvm-project/commit/693a95a69416e23a31e46d3d2c81e854688e606e
(probably not really suitable place to start such discussion, I should had
write it here at the beginning) it seems that there are such plans, but it
isn't clear for me if somebody working on this now.

*@sivachandra <https://github.com/sivachandra>* also pointed out some
design goal for these rules:


>    - We want the individual functions to be mutually exclusive. So, we
>    ideally want a separate target for every libc function.
>    - What actually is in a user's libc will be left up to the user. That
>    is, the users are free to pick-and-choose what they want from LLVM libc and
>    get the rest from another libc if they so choose to. Hence, we ideally *do
>    not* want to provide a Bazel target for the final libc. The users will
>    list the cc_library targets of the individual functions of their interest
>    as deps to the actual libc target.
>
> *Another question: *Would it be the same for libcxx? Or libcxx is
completely different topic to discuss?

I would really appreciate any help :)

Best regards,
Kirill Zabelin

* <https://github.com/sivachandra>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libc-dev/attachments/20211124/d2ca7997/attachment.html>


More information about the libc-dev mailing list