[SERVER-61373] v4 toolchain is missing llvm-mi Created: 10/Nov/21  Updated: 27/Oct/23  Resolved: 16/Dec/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sergey Galtsev (Inactive) Assignee: Ryan Egesdahl (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Dev Platform 2021-12-27
Participants:

 Description   

There's llvm-mi in v3 toolset, but not in v4

llvm-mi is used in vscode for native debugging:

https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp



 Comments   
Comment by Sergey Galtsev (Inactive) [ 14/Dec/21 ]

Ok, understood.

Comment by Andrew Morrow (Inactive) [ 14/Dec/21 ]

sergey.galtsev - The purpose of the toolchain is to support building and testing the server in CI and for release, to backfill toolchain support on developer systems when the system toolchain is insufficient, and to provide stable versions of required development tools across systems in order to interoperate with toolchain produced binaries. If the LLVM project has deemed lldb-mi as something that doesn't belong in modern LLVM due to its lack of a maintainer, then I'm not comfortable re-adding it, as it could prevent us from making necessary upgrades in the future without becoming the de facto maintainer. As ryan.egesdahl points out, there is nothing stopping you from building your own lldb-mi against the toolchain LLVM support libraries, which are or shortly will be present, or obtaining lldb-mi from your system package manager. In particular, I'll note that homebrew provides lldb-mi in the llvm@9 packages (and probably older as well), and Ubuntu 20.04 provides it in the lldb-10 package (and probably older as well). 

Comment by Sergey Galtsev (Inactive) [ 13/Dec/21 ]

ryan.egesdahl the issue with not having llvm-mi in the toolchain is that debugging in vscode will be affected, and many engineers here use vscode. Since llvm-mi is not used during code compilation, perhaps you can include it into toolchain despite objections? Alternative would be either to stop debugging in vscode (unrealistic), sticking to v3 toolchain (undesirable), or finding even more backwards ways to debug. All these alternatives are worse that providing a somewhat old tool.

Comment by Ryan Egesdahl (Inactive) [ 13/Dec/21 ]

The reason llvm-mi was removed from the LLVM distribution is apparently that it hasn't been updated in a very long time, and they are hoping that splitting it out into its own repository will encourage someone to step up and maintain it. Unfortunately, that means that llvm-mi is an unmaintained tool. I have many reservations about including an unmaintained tool in the toolchain because if/when it breaks or a bug is encountered, I don't think we can promise that we'll be able to fix it or convince upstream to do so.

What I propose is that we not include llvm-mi in the toolchain and instead enable LLVM in the v4 toolchain to be built against so any user who wants to can add any tool they like - such as this one. We've already had some success building IWYU against LLVM with minimal effort, so hopefully it will be as easy for users to do the same with llvm-mi. The next rollout of the v4 toolchain should have this capability.

I know it's not the optimal solution, but I think it's the best we can offer at this time.

Generated at Thu Feb 08 05:52:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.