[PATCH] D143295: [bazel] Move bazel configuration to a Python script

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 07:29:47 PST 2023


thopre added a comment.

In D143295#4109933 <https://reviews.llvm.org/D143295#4109933>, @chapuni wrote:

> Excuse me, I am not a fan of it.
> Could you remain vars.bzl stuff, unless python would have interest to vars?
>
> I am planning for vars.bzl to give configurations to build rules (and repository rules).

My point is to simplify the work needed to use LLVM as an external bazel dependency with a repository override, as documented in Tensorflow MLIR backend for instance: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/README.md
Note that those instructions are not complete as it stands because of vars.bzl which LLVM bazel build system expects but is not created if using a repository override. That's why I wanted to move it into a Python script to be able to call it instead of doing all those manual steps.

> FYI, re. `_extract_cmake_settings`;
>
> - It would disappear when the central config database (among build systems) would be introduced.

What's the timeline for that to happen? Is there a patch under review already?

> - It could be rewritten smarter with python. I wrote it under restriction of starlark.

I'm happy to simplify it, is there a Python module to deal with CMakeLists.txt or just improve the parsing code?

> Thank you.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143295/new/

https://reviews.llvm.org/D143295



More information about the llvm-commits mailing list