[Lldb-commits] [lldb] r253478 - Switched cmake build from using buildSwigWrapperClases.py to the cleaned up version.
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 18 13:22:41 PST 2015
Sure thing.
I'll get the finish-bindings script taken care of in another pass after
T-day week.
On Wed, Nov 18, 2015 at 1:13 PM, Zachary Turner <zturner at google.com> wrote:
> Tested this on Windows, seems to work fine. r253501 has a minor fix that
> was causing a CMake warning, but overall everything works great. Happy to
> see progress on this front.
>
> On Wed, Nov 18, 2015 at 12:47 PM Todd Fiala <todd.fiala at gmail.com> wrote:
>
>> BTW if you cook up something on the swig-as-a-service end that ends up
>> working to eliminate the need for swig, I'll be happy to remove the static
>> binding support at that point.
>>
>> -Todd
>>
>> On Wed, Nov 18, 2015 at 12:45 PM, Todd Fiala <todd.fiala at gmail.com>
>> wrote:
>>
>>>
>>> On Wed, Nov 18, 2015 at 11:55 AM, Zachary Turner <zturner at google.com>
>>> wrote:
>>>
>>>> By the way, it would be great if we could kill this
>>>> modify-lldb-python.py.
>>>>
>>>
>>> I'm totally up for that.
>>>
>>>
>>>> It seems like a total hackjob, and there's nothing it does that can't
>>>> be done better by wrapping the lldb module instead of modifying it.
>>>>
>>>> For example, it goes through and injects a bunch of methods to classes
>>>> in the lldb module. But if, instead of renaming lldb.py to __init__.py, we
>>>> renamed it to lldb_internal.py, and then we can actually check in an
>>>> __init__.py that does this:
>>>>
>>>> from lldb_internal import *
>>>>
>>>> # Loop over each class in lldb_internal, injecting methods
>>>> # and modifying the types / classes as necessary
>>>>
>>>> Then this would be much better, as it eliminates a post processing step
>>>> and allows easier maintenance of this code.
>>>>
>>>>
>>> Sounds like a great idea. I'd love to get rid of some post-processing
>>> steps.
>>>
>>>
>>>>
>>>> On Wed, Nov 18, 2015 at 10:37 AM Zachary Turner <zturner at google.com>
>>>> wrote:
>>>>
>>>>> Yea, this is the right one. Thanks! I haven't tested this yet, but I
>>>>> will later. (Our buildbot currently builds with LLDB_DISABLE_PYTHON=1, so
>>>>> if there is a problem with this, the Windows buildbot wouldn't pick it up,
>>>>> although the others probably would)
>>>>>
>>>>> On Wed, Nov 18, 2015 at 10:14 AM Todd Fiala <todd.fiala at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> If I have that right, we're fine. The prepare_bindings.py still
>>>>>> calls modify-python-lldb.py.
>>>>>>
>>>>>> scripts/prepare_bindings.py is meant to be the same as
>>>>>> createSwigBindings.py, and scripts/python/prepare_binding_Python.py is
>>>>>> meant to be the same as buildSwigPython.py.
>>>>>>
>>>>>> Once I make sure that I haven't broken anything for anybody with it,
>>>>>> I'll get rid of the other scripts.
>>>>>>
>>>>>> On Wed, Nov 18, 2015 at 10:09 AM, Todd Fiala <todd.fiala at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> You're talking about this change, right? (I'm looking at it now...)
>>>>>>>
>>>>>>> commit cc353bbc992ab324aef395c54a2a46fcaaa3855b
>>>>>>> Author: Zachary Turner <zturner at google.com>
>>>>>>> Date: Mon Nov 16 22:40:20 2015 +0000
>>>>>>>
>>>>>>> Insert the SWIG version into LLDB's __init__.py
>>>>>>>
>>>>>>> The goal here is to allow us to add skip / xfail decorators
>>>>>>> based on SWIG version.
>>>>>>>
>>>>>>> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@253262
>>>>>>> 91177308-0d34-0410-b5e6-96231b3b80d8
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Nov 18, 2015 at 10:07 AM, Todd Fiala <todd.fiala at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Double checking now, if it happens in that lldb-modify script,
>>>>>>>> we're covered. Otherwise I need to adjust... (the bulk of the rewrite
>>>>>>>> happened on Friday/Sunday).
>>>>>>>>
>>>>>>>> On Wed, Nov 18, 2015 at 9:47 AM, Zachary Turner <zturner at google.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Just to be sure, did you catch the change I made to the old
>>>>>>>>> scripts in the past few days to embed the swig version in the generated
>>>>>>>>> lldb.py? Maybe you did, I just want to make sure that change is in your
>>>>>>>>> new version.
>>>>>>>>>
>>>>>>>>> On Wed, Nov 18, 2015 at 9:38 AM Todd Fiala via lldb-commits <
>>>>>>>>> lldb-commits at lists.llvm.org> wrote:
>>>>>>>>>
>>>>>>>>>> Author: tfiala
>>>>>>>>>> Date: Wed Nov 18 11:36:15 2015
>>>>>>>>>> New Revision: 253478
>>>>>>>>>>
>>>>>>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=253478&view=rev
>>>>>>>>>> Log:
>>>>>>>>>> Switched cmake build from using buildSwigWrapperClases.py to the
>>>>>>>>>> cleaned up version.
>>>>>>>>>>
>>>>>>>>>> This change does not introduce static bindings. It is simply
>>>>>>>>>> using
>>>>>>>>>> the pylinted cleaned up code in prepare_bindings.py.
>>>>>>>>>>
>>>>>>>>>> If this breaks anyting, I'll revert immediately and figure out
>>>>>>>>>> what
>>>>>>>>>> needs to be addressed. I'm looking to wrap up
>>>>>>>>>> the cleanup aspect of the code change (pylinted, removal of code
>>>>>>>>>> that
>>>>>>>>>> implements existing python stdlib code, fixes for Xcode adoption,
>>>>>>>>>> etc.).
>>>>>>>>>>
>>>>>>>>>> Modified:
>>>>>>>>>> lldb/trunk/CMakeLists.txt
>>>>>>>>>> lldb/trunk/scripts/CMakeLists.txt
>>>>>>>>>>
>>>>>>>>>> Modified: lldb/trunk/CMakeLists.txt
>>>>>>>>>> URL:
>>>>>>>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=253478&r1=253477&r2=253478&view=diff
>>>>>>>>>>
>>>>>>>>>> ==============================================================================
>>>>>>>>>> --- lldb/trunk/CMakeLists.txt (original)
>>>>>>>>>> +++ lldb/trunk/CMakeLists.txt Wed Nov 18 11:36:15 2015
>>>>>>>>>> @@ -33,6 +33,7 @@ if (NOT LLDB_DISABLE_PYTHON)
>>>>>>>>>> add_custom_target( finish_swig ALL
>>>>>>>>>> COMMAND ${PYTHON_EXECUTABLE}
>>>>>>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
>>>>>>>>>> "--srcRoot=${LLDB_SOURCE_DIR}"
>>>>>>>>>> "--targetDir=${CMAKE_CURRENT_BINARY_DIR}/scripts"
>>>>>>>>>> "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/scripts"
>>>>>>>>>> "--prefix=${CMAKE_BINARY_DIR}"
>>>>>>>>>> "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
>>>>>>>>>> DEPENDS
>>>>>>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
>>>>>>>>>> + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
>>>>>>>>>> COMMENT "Python script sym-linking LLDB Python API")
>>>>>>>>>> # We depend on liblldb being built before we can do this
>>>>>>>>>> step.
>>>>>>>>>> add_dependencies(finish_swig liblldb lldb-argdumper)
>>>>>>>>>>
>>>>>>>>>> Modified: lldb/trunk/scripts/CMakeLists.txt
>>>>>>>>>> URL:
>>>>>>>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=253478&r1=253477&r2=253478&view=diff
>>>>>>>>>>
>>>>>>>>>> ==============================================================================
>>>>>>>>>> --- lldb/trunk/scripts/CMakeLists.txt (original)
>>>>>>>>>> +++ lldb/trunk/scripts/CMakeLists.txt Wed Nov 18 11:36:15 2015
>>>>>>>>>> @@ -18,9 +18,10 @@ add_custom_command(
>>>>>>>>>> DEPENDS ${SWIG_HEADERS}
>>>>>>>>>> DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/buildSwigPython.py
>>>>>>>>>> DEPENDS
>>>>>>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/Python/modify-python-lldb.py
>>>>>>>>>> - COMMAND ${PYTHON_EXECUTABLE}
>>>>>>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py
>>>>>>>>>> "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}"
>>>>>>>>>> "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}"
>>>>>>>>>> "--swigExecutable=${SWIG_EXECUTABLE}" -m
>>>>>>>>>> + COMMAND ${PYTHON_EXECUTABLE}
>>>>>>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/prepare_bindings.py
>>>>>>>>>> "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}"
>>>>>>>>>> "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}"
>>>>>>>>>> "--swigExecutable=${SWIG_EXECUTABLE}"
>>>>>>>>>> COMMENT "Python script building LLDB Python wrapper")
>>>>>>>>>> set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
>>>>>>>>>> PROPERTIES GENERATED 1)
>>>>>>>>>> +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/lldb.py
>>>>>>>>>> PROPERTIES GENERATED 1)
>>>>>>>>>>
>>>>>>>>>> add_custom_target(swig_wrapper ALL
>>>>>>>>>> DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> lldb-commits mailing list
>>>>>>>>>> lldb-commits at lists.llvm.org
>>>>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -Todd
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -Todd
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -Todd
>>>>>>
>>>>>
>>>
>>>
>>> --
>>> -Todd
>>>
>>
>>
>>
>> --
>> -Todd
>>
>
--
-Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151118/d8876557/attachment-0001.html>
More information about the lldb-commits
mailing list