[lldb-dev] Minimum required swig version?

Ted Woodward via lldb-dev lldb-dev at lists.llvm.org
Thu Apr 16 14:28:24 PDT 2020


http://lldb.llvm.org/resources/build.html Says we need swig 2 or later:

If you want to run the test suite, you'll need to build LLDB with Python scripting support.
*         Python<http://www.python.org/>
*         SWIG<http://swig.org/> 2 or later.

I don't think this is correct anymore.

test/API/python_api/sbenvironment/TestSBEnvironment.py has this line:
        env.Set("FOO", "bar", overwrite=True)

lldb built with swig 2.0.11 fails this test with the error:
    env.Set("FOO", "bar", overwrite=True)
TypeError: Set() got an unexpected keyword argument 'overwrite'

It works when lldb is built with swig 3.0.8.

inspect.getsource(lldb.SBEnvironment) gives the following:
swig 2.0.11:
      """Set(SBEnvironment self, char const * name, char const * value, bool overwrite) -> bool"""\n        return _lldb.SBEnvironment_Set(self, *args)\n\n
swig 3.0.8:
    """Set(SBEnvironment self, char const * name, char const * value, bool overwrite) -> bool"""\n        return _lldb.SBEnvironment_Set(self, name, value, overwrite)\n\n\n

Is swig 3 required? Do we need to update the build page?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200416/93878723/attachment.html>


More information about the lldb-dev mailing list