This is an archive of the discontinued LLVM Phabricator instance.

Adjust for Python-3.
ClosedPublic

Authored by sivachandra on Feb 11 2016, 6:27 PM.

Details

Summary

This does not yet give us a clean testsuite run but it does help with:

  1. Actually building on linux
  2. Run the testsuite with over 70% tests passing on linux.

Diff Detail

Event Timeline

sivachandra retitled this revision from to Adjust for Python-3..
sivachandra updated this object.
sivachandra added reviewers: zturner, tfiala, labath.
sivachandra added a subscriber: lldb-commits.

BTW, I should mention that the testsuite run with Python-2.x is still clean with this change applied.

zturner edited edge metadata.Feb 11 2016, 8:31 PM

Very excited to see more platforms trying to get Python 3 working.

source/API/liblldb.exports
4

I don't really know what the syntax of this file is, but the symbol is called PyInit__lldb, not PyInit__lld. Is this still correct? Does it matter that you're exporting both the Python 2 and the Python 3 symbol in both versions even when they're not defined?

labath accepted this revision.Feb 12 2016, 4:16 AM
labath edited edge metadata.
labath added inline comments.
scripts/Python/modules/readline/readline.cpp
55

existing code uses PY_MAJOR_VERSION >= 3 (which also looks much nicer), so let's be consistent.

source/API/liblldb.exports
4

This just restricts the exported symbols to the ones matching the wildcards, so I don't think it matters that both are present.
OTOH, unless we know the reason why the b has to be omitted from the wildcard, then I suggest you add it.

This revision is now accepted and ready to land.Feb 12 2016, 4:16 AM
sivachandra marked an inline comment as done.
sivachandra edited edge metadata.

Address comments

sivachandra added inline comments.Feb 12 2016, 12:33 PM
source/API/liblldb.exports
4

I just followed the existing "convention". Works without the "*" as well, so removed it according to the suggestion.

4

zturner: The listing here does not say what *should* be exported, but that a symbol should be exported only if matches one of these regexes.

sivachandra closed this revision.Feb 12 2016, 12:35 PM
packages/Python/lldbsuite/test/lldbtest.py