https://github.com/labath approved this pull request.

> I know in my other pull request we talked about linking against lldb/host for 
> some utilities like the use of Pipe, but is this an issue with the current 
> architecture? Should I avoid that Host/FileSystem API or will I run into this 
> with other APIs potentially?

You're right. This is potential problem, one whose scope I did not fully 
realize when I made that suggestion. It happens because liblldb only exposes 
the public lldb API, which means that anything linking against it gets its own 
copy it. This can be a problem with classes that use singletons or some for of 
explicit initialization, etc.

Nonetheless, I still believe reimplementing any class that we might want to use 
on the other side of the API is not a solution. Overall, I think you've managed 
to strike a good balance with this version of the patch. The filesystem class 
is not particularly important here as the only thing we really get from it is 
the (os-specific) name of /dev/null. The socket and pipe classes on the other 
hand, are a lot more complicated, which makes it more worthwhile to reuse them. 
Fortunately, they are also the ones that don't suffer from these kinds of 
problems.

If you run into other problems with some changes like this, let me know, and 
I'll see what I can do about it.

https://github.com/llvm/llvm-project/pull/120457
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to