Note: I’m not the sole decision maker here but I am trying to be more clear about our platform support “rules” (as in, we need to document some). So I will make some bold statements that others may disagree with me on.
The biggest question for me here is why does this need to be upstream?
Obviously I don’t have any knowledge of your commercial pressures, but there are other options here. Tell me if you’ve assessed those:
- Adding GDB protocol support to pdebug.
- Teaching LLDB to speak pdebug’s protocol (take
GDBRemoteCommunicationClient
, make a PDebugRemoteCommunicationClient
).
These require you to maintain pdebug of course, and we’d be very unlikely to accept major lldb client changes if the server side wasn’t upstream too - so I’m sure you’ve thought about it but I have to ask anyway.
My gut says that if you’re looking to move away from the legacy tools anyway, porting lldb-server is a good option.
This shouldn’t be a problem. We do generally support things with ptrace but then there’s Windows that’s completely different and that fits in fine.
My main question here is why does this need to be upstream?
(I keep meaning to write these points up as a formal document but too late for that right now
)
I respect the openness and you are of course free to ask for feedback even if you weren’t going to upstream it, but we have to consider the cost of carrying this code.
I know from my own employer that sometimes we upstream things basically as a simple way to provide it to partners to build on. So I understand that angle but as a community, I do not think we should give that any weight. A contribution has to have its own merits.
Also if you’re doing this then I would say ok why not implement the full toolchain?
If the code you’re upstreaming can’t be built without a downstream toolchain, this is not good. At least with IBM’s AIX they are porting clang too.
You might have desires for partners to contribute fixes upstream as well, but I’m wary of that because 1. you could do that on a fork and 2. I don’t like agreeing to things based on future promises and 3. that will be more burden for the few reviewers we have, even if you are also helping out.
I do welcome the interest from the automotive segment in lldb, but again I don’t think our goal here is to build a user base so I wouldn’t accept it based on that (and that’s a terrible argument given that Android + iOS is in the millions already).
In some sense being upstream lowers the maintenance burden for you because we are less likely to break at least non-native code related to QNX. But don’t think it removes the burden, because if you’re not on the hook for fixing issues with it, we (at least I will) will gladly allow people to arbitrarily ignore QNX when making changes. And if that happens too many times, it will be removed.
(I doubt any of that is news to you, but if you need to quote this to your management to be crystal clear, there is it
)
I am not saying that because this is a commercial OS, we would not accept it. We have already said ok in principle to an AIX port, which is also commercial.
And we support Mac OS too don’t we, but my point is more - commercial, not available on demand, runs in strange scenarios. So for AIX I need PowerPC, here I need some supported device. Mac at least I could borrow a colleague’s work laptop or go to a store and get one same day.
(also Apple invented lldb so the point is moot, but if they were proposing Mac support now, I would ask the same things)
So read the AIX thread (Port LLDB to IBM AIX), and here’s my summary of what I think are the minimum things we would need to accept this upstream:
- At least 2 maintainers for the platform (llvm-project/lldb/Maintainers.rst at main · llvm/llvm-project · GitHub). Otherwise when one of you sends a PR, we will have no platform expert to review it.
- API tests must be running, at least partially, before anything is accepted upstream. I personally do not want to see a thousand
skipIfQNX
either, so it will need to be reasonably mature (you can mitigate that by skipping categories of tests instead if you know e.g. breakpoints don’t work yet).
- A buildbot for this configuration that is silent, given that no contributor has immediate access to your platform so they cannot be expected to solve issues arising on it.
- This needs to be set up as early as possible, ideally day one building whatever works using the QNX toolchain right now.
-
- because it seems that engineers freely agree to adding a buildbot but management hates paying to host them

- A commitment to reproduce and solve those issues yourselves, which will need to happen in the majority of cases (the community can help but when it comes to QNX details, that’s on you).
- A process by which an external contributor can reproduce a QNX build/setup without having to sign license agreements, start free trials or otherwise do anything that their employer is going to refuse to do. This doesn’t have to be quick but it has to be possible. For example, I am upstreaming new AArch64 support which folks can reproduce using Linux and a free simulator from Arm or with QEMU.
- If this is not possible due to the QNX business model, you may be able to substitute this with even stronger commitments on the previous points. Essentially saying that you will never ask anyone upstream to deal with a QNX problem (but again, why be upstream at that point, is what I would ask myself in your shoes).
Look at that and consider the costs that apply regardless of whether you are upstream or downstream. You could be downstream and still report issues to us, the only difference is we wouldn’t have your code in front of us, but a public fork could solve that. We have accepted fixes in the past where we can trigger it with another target in a test case.
You can also run buildbot locally - How To Add Your Build Configuration To LLVM Buildbot Infrastructure — LLVM 20.0.0git documentation . So that’s an option if you wanted to start downstream but be able to report in a way that upstream will be receptive to.
Also think about whether you’re likely to require downstream patches regardless of how much is upstream. Again, from projects at Arm I know we’ve tried to be 100% upstream but it never actually happens.
And if you’re going to support the needs of these customers, are you going to fight the uphill battle to upstream specific new commands and API features and so on?
All this is a lot to take in and I do not mean to drown you in text here, or imply that I am dismissing this proposal. I will at some point try to make a more succinct, generalised set of guidelines that the community can agree on for future proposals.