This is an archive of the discontinued LLVM Phabricator instance.

[lldb/swig] Remove deprecated flags for generating bindings
ClosedPublic

Authored by mib on Jan 20 2023, 11:58 AM.

Details

Summary

This patch conditionaly removes the -py3 swig flag that was used to
generate python3 bindings, since it's unsued since SWIG 4.1.0.

Deprecated command line option: -py3. Ignored, this option is no longer supported

This also removes the -shadow flag that have been deprecated since 2002.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Jan 20 2023, 11:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 11:58 AM
mib requested review of this revision.Jan 20 2023, 11:58 AM
kastiglione accepted this revision.Jan 20 2023, 12:02 PM
This revision is now accepted and ready to land.Jan 20 2023, 12:02 PM
JDevlieghere requested changes to this revision.EditedJan 20 2023, 12:20 PM

In what version of SWIG was this deprecated? We officially support SWIG 3 and later. What happens with SWIG 3 if you omit the flag, is it a NOOP? If so then this is fine, otherwise we should conditionalize it based on the SWIG version (or propose bumping the minimum to SWIG4). We should include this information in the commit message.

(Requesting changes because Dave already accepted it)

This revision now requires changes to proceed.Jan 20 2023, 12:20 PM

Looks like -py3 was marked deprecated and no-effect in 4.1.

mib added a comment.Jan 20 2023, 12:36 PM

In what version of SWIG was this deprecated? We officially support SWIG 3 and later. What happens with SWIG 3 if you omit the flag, is it a NOOP? If so then this is fine, otherwise we should conditionalize it based on the SWIG version (or propose bumping the minimum to SWIG4). We should include this information in the commit message.

(Requesting changes because Dave already accepted it)

For now, I'll remove the flag conditionally.

mib added a comment.Jan 20 2023, 12:36 PM

Looks like -py3 was marked deprecated and no-effect in 4.1.

Thanks for looking it up Dave :)

kastiglione added inline comments.Jan 20 2023, 12:37 PM
lldb/bindings/python/CMakeLists.txt
16–17

Note that -shadow has been deprecated since 2002 and is on by default.

mib added inline comments.Jan 20 2023, 12:54 PM
lldb/bindings/python/CMakeLists.txt
16–17

I guess that this is a leftover from the time we were support SWIG 1.x ... Since we bumped SWIG 3 as the minimal required version, I guess we could also get rid of the shadow flag (I checked the flag doesn't exist on Swig 3.0.12).

mib updated this revision to Diff 490983.Jan 20 2023, 3:01 PM
mib retitled this revision from [lldb/swig] Remove deprecated `-py3` flag to generate bindings to [lldb/swig] Remove deprecated flags for generating bindings.
mib edited the summary of this revision. (Show Details)

Address @JDevlieghere & @kastiglione comments

This revision is now accepted and ready to land.Jan 20 2023, 3:03 PM
This revision was automatically updated to reflect the committed changes.