This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Pass the target triple to the compiler when determining the DWARF version
ClosedPublic

Authored by JDevlieghere on Oct 22 2021, 9:17 AM.

Details

Summary

When targeting iOS, the default dwarf version is 2 and not 4. Currently, the test suite does not pick up on that because it invokes the test compiler without a target triple. This patch fixes that and now correctly skips tests that have a dwarf version specified in a skipIf decorator.

rdar://84530477

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Oct 22 2021, 9:17 AM
JDevlieghere created this revision.
JDevlieghere edited the summary of this revision. (Show Details)Oct 22 2021, 9:19 AM
teemperor accepted this revision.Oct 22 2021, 9:42 AM

Some nits but otherwise LGTM

lldb/packages/Python/lldbsuite/test/builders/builder.py
26

Maybe return None? Then the calling code crashes if it doesn't handle the value instead of silently picking the next arg as some bogus triple value.

lldb/packages/Python/lldbsuite/test/builders/darwin.py
60
values = [arch, vendor, os, version, env]
if None in values:
    return ""
return '-'.join(values)
This revision is now accepted and ready to land.Oct 22 2021, 9:42 AM
vsk added a comment.Oct 22 2021, 9:53 AM

Thanks! Lgtm as well, but with the same nits as Raphael.

This revision was landed with ongoing or failed builds.Oct 22 2021, 10:13 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2021, 10:13 AM