[Lldb-commits] [PATCH] D94888: [lldb] Add -Wl, -rpath to make tests run with fresh built libc++
Jordan Rupprecht via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 20 20:26:21 PST 2021
rupprecht added a comment.
In D94888#2506140 <https://reviews.llvm.org/D94888#2506140>, @labath wrote:
> In D94888#2506000 <https://reviews.llvm.org/D94888#2506000>, @MaskRay wrote:
>
>> In D94888#2505992 <https://reviews.llvm.org/D94888#2505992>, @labath wrote:
>>
>>> It looks like this is removing the ability to build libc++ tests with gcc (as it does not have the `-stdlib` option). While having that ability would be nice, I don't believe there's anyone currently using that configuration, so it shouldn't stand in the way of other things. But we should also update the python detection code then (in `canRunLibcxxTests` in `packages/Python/lldbsuite/test/dotest.py` -- I guess you just need to remove the `if os.path.isdir("/usr/include/c++/v1"):` blurb)
>>>
>>> As for testing against the system libc++ with clang, I guess that should still work, as the extra rpath will be just ignored in that case...
>>
>> I do not know whether the following few lines D9426 <https://reviews.llvm.org/D9426> were intentional.
>
> I am pretty sure they were. This flag is needed to use (system) libc++ with gcc, and this was happening at a time when we were running the test suite with gcc, as it was still the default compiler for android.
Is anyone running tests in this build mode (gcc + libc++) still? Should we keep this support around?
================
Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:765-770
cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
_, stderr = p.communicate("#include <algorithm>\nint main() {}")
if not p.returncode:
return True, "Compiling with -stdlib=libc++ works"
return False, "Compiling with -stdlib=libc++ fails with the error: %s" % stderr
----------------
I don't know if this is the right place to do it, but it would be good to also check somewhere that binaries built w/ libc++ actually run. That would help with the error you were seeing. Maybe something like this would work?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94888/new/
https://reviews.llvm.org/D94888
More information about the lldb-commits
mailing list