[PATCH] D151006: [bazel] Remove terminfo dependency

Aaron Siddhartha Mondal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 07:15:26 PDT 2023


aaronmondal added a comment.

> You say that it doesn't provide essential functionality. Doesn't that mean it should be an optional dep, perhaps defaulting to disabled, rather than deleting terminfo entirely?

For llvm/Support/Unix/Process.inc <https://github.com/llvm/llvm-project/blob/387c49f693c82bdf8b9b0f1ef48a92f51bb781b4/llvm/lib/Support/Unix/Process.inc#L321> I question whether terminfo is necessary at all. That code looks hacky in the first place and we already have fallbacks to `TERM` that I'd imagine to basically accomplish the same thing, but without locks and `extern C`-to-avoid-searching-for-headers.

> terminfo is used by a few tools such as lldb and clang-repl. The most significant user is lldb, which Bazel doesn't have a port yet. For the other tools, I agree that they "doesn't provide essential functionality,"

Hmm we'd definitely want lldb in the overlay at some point. The current implementation of the terminfo dep in Bazel isn't reproducible though. We'd need an "external" terminfo/curses for lldb. The current build files only support "disable" and "system" configurations.

AFAICS one would usually build ncurses to get terminfo, right? terminfo in lldb is also only relevant if curses is present. Would it make sense to create an ncurses build file instead of the terminfo checks?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151006



More information about the llvm-commits mailing list