llvm / llvm/llvm-project

LLDB should have a way to check if language support is included

Open
#218,859 2 comments 0 reactions 0 assignees View on GitHub
lldb
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Mostly for Fortran (https://github.com/llvm/llvm-project/issues/109119) if we end up having to link to Flang (https://github.com/llvm/llvm-project/pull/207764), which not every build is going to do.

A user can just try a program, but there is a difference between basic debug working because of DWARF, and actual language support. Also they may not know if a problem is a bug or missing language support.

So far we have not needed this because C/C++/ObjC are always included, and Swift exists in its own ecosystem.

We could add to `version -v`, which we recommend in https://lldb.llvm.org/use/troubleshooting.html#how-do-i-find-out-which-features-my-copy-of-lldb-has already:
```
(lldb) version -v
lldb version 24.0.0git (https://github.com/llvm/llvm-project.git revision 7380050ae1a8261400350dd08a952ad3f00db1b3)
<...>
lua: no
lzma: yes
python: yes
targets: [AArch64, AMDGPU, ARM, AVR, BPF, Hexagon, Lanai, LoongArch, Mips, MSP430, NVPTX, PowerPC, RISCV, Sparc, SPIRV, SystemZ, VE, WebAssembly, X86, XCore]
<...>
```
We could add a `languages: [` key to this. To differentiate it from the `python` and `lua` keys, which really mean `python scripting` (and maybe we should rename those too).

Contributor guide

Open the contributing guide

Research direction

Start with LLDB's `version -v` implementation and the existing `python` and `lua` feature reporting. Review the troubleshooting documentation referenced in the issue, then determine how language support can be reported separately from scripting support. Done means `version -v` clearly identifies supported language features, including whether Fortran support is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.