[Lldb-commits] [PATCH] D12667: [cmake] Remove LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION.
brucem created this revision. brucem added reviewers: zturner, clayborg, labath. brucem added a subscriber: lldb-commits. This should be a mandatory build process going forward, if Python is enabled. The longer term desire is to remove the old shell scripts entirely. http://reviews.llvm.org/D12667 Files: CMakeLists.txt cmake/modules/LLDBConfig.cmake scripts/CMakeLists.txt Index: scripts/CMakeLists.txt === --- scripts/CMakeLists.txt +++ scripts/CMakeLists.txt @@ -9,49 +9,26 @@ ${LLDB_SOURCE_DIR}/include/lldb/lldb-versioning.h ) -if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION ) - find_package(SWIG REQUIRED) - add_custom_command( -OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp -DEPENDS ${SWIG_SOURCES} -DEPENDS ${SWIG_INTERFACES} -DEPENDS ${SWIG_HEADERS} -DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.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 -COMMENT "Python script building LLDB Python wrapper") - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1) +find_package(SWIG REQUIRED) +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp + DEPENDS ${SWIG_SOURCES} + DEPENDS ${SWIG_INTERFACES} + DEPENDS ${SWIG_HEADERS} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.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 + COMMENT "Python script building LLDB Python wrapper") +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1) - add_custom_target(swig_wrapper ALL -DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp -) +add_custom_target(swig_wrapper ALL + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp + ) - # Install the LLDB python module on all operating systems (except Windows) - if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") -install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} -DESTINATION lib${LLVM_LIBDIR_SUFFIX}) - endif() -else () - add_custom_command( -OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp -DEPENDS ${SWIG_SOURCES} - DEPENDS ${SWIG_INTERFACES} -# swig was directly invoked on Windows (where the Python API is not being generated) but on other platforms, we need to run the *swig-wrapper-classes.sh shell-scripts. -#COMMAND swig -c++ -shadow -python -I${LLDB_SOURCE_DIR}/include -I./. -outdir ${LLDB_SOURCE_DIR}/scripts/Python -o ${LLDB_SOURCE_DIR}/source/LLDBWrapPython.cpp ${LLDB_SOURCE_DIR}/scripts/lldb.swig -COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m -COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m -COMMENT "Building lldb python wrapper") - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1) - - add_custom_target(swig_wrapper ALL -DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp -) - - # Install the LLDB python module on all operating systems (except Windows) - if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") -install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} -DESTINATION lib${LLVM_LIBDIR_SUFFIX}) - endif() -endif () +# Install the LLDB python module on all operating systems (except Windows) +if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} + DESTINATION lib${LLVM_LIBDIR_SUFFIX}) +endif() # build Python modules add_subdirectory(Python/modules) Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -26,8 +26,6 @@ set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_DISABLE_CURSES} CACHE BOOL "Disables the Curses integration.") -set(LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 1 CACHE BOOL - "Enables using new Python scripts for SWIG API generation .") set(LLDB_RELOCATABLE_PYTHON 0 CACHE BOOL "Causes LLDB to use the PYTHONHOME environment v
[Lldb-commits] [PATCH] D12668: [www] Typo fixes.
brucem created this revision. brucem added a reviewer: clayborg. brucem added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. http://reviews.llvm.org/D12668 Files: www/build.html www/index.html www/test.html www/varformats.html Index: www/varformats.html === --- www/varformats.html +++ www/varformats.html @@ -990,7 +990,7 @@ (i_am_cool) one = x=3 - When defining a named summmary, binding it to one or more types becomes optional. + When defining a named summary, binding it to one or more types becomes optional. Even if you bind the named summary to a type, and later change the summary string for that type, the named summary will not be changed by that. You can delete named summaries by using the type summary delete command, as if the Index: www/test.html === --- www/test.html +++ www/test.html @@ -81,7 +81,7 @@ additional --test-subdir SUBDIR arg. When specified, SUBDIR is relative to the root test directory and will limit all parallel test running to that - sudirectory's tree of tests. + subdirectory's tree of tests. The parallel test runner will run all tests within a @@ -117,7 +117,7 @@ Currently, running the remote test suite is supported only with dotest.py (or dosep.py with a single thread), but we - expect this issue to be adressed in the near future. + expect this issue to be addressed in the near future. Index: www/index.html === --- www/index.html +++ www/index.html @@ -61,7 +61,7 @@ Up to date language support for C, C++, Objective C Multi-line expressions that can declare local variables and types - Utilitize the JIT for expressions when supported + Utilize the JIT for expressions when supported Evaluate expression Intermediate Representation (IR) when JIT can't be used Index: www/build.html === --- www/build.html +++ www/build.html @@ -16,7 +16,7 @@ -Continuous Integraton +Continuous Integration The following LLVM buildbots build and test LLDB trunk: @@ -362,7 +362,7 @@ In order to debug remote targets running different architectures than your host, you will need to compile LLDB (or at least the server component) for the target. While the easiest solution is to just compile it locally on the target, this is often not - feasable, and in these cases you will need to cross-compile LLDB on your host. + feasible, and in these cases you will need to cross-compile LLDB on your host. @@ -453,7 +453,7 @@ Ubuntu already provides the packages necessary to cross-compile LLDB for arm64. It - is sufficient to install pacakges gcc-aarch64-linux-gnu, g++-aarch64-linux-gnu, + is sufficient to install packages gcc-aarch64-linux-gnu, g++-aarch64-linux-gnu, binutils-aarch64-linux-gnu. Then it is possible to prepare the cmake build with the following parameters: @@ -485,7 +485,7 @@ If you wanted to build a full version of LLDB and avoid passing -DLLDB_DISABLE_PYTHON and other options, you would need to obtain the target - versions of the respective libraries. The easiest way to achive this is to use the + versions of the respective libraries. The easiest way to achieve this is to use the qemu-debootstrap utility, which can prepare a system image using qemu and chroot to simulate the target environment. Then you can install the necessary packages in this environment (python-dev, libedit-dev, etc.) and point your @@ -524,7 +524,7 @@ - Note that the full LLVM build is not functional on android yet, so simply runing + Note that the full LLVM build is not functional on android yet, so simply running ninja will not work. You will need to manua
Re: [Lldb-commits] [PATCH] D12667: [cmake] Remove LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION.
Looks good, thanks On Sun, Sep 6, 2015 at 8:06 AM Bruce Mitchener wrote: > brucem created this revision. > brucem added reviewers: zturner, clayborg, labath. > brucem added a subscriber: lldb-commits. > > This should be a mandatory build process going forward, if Python > is enabled. The longer term desire is to remove the old shell > scripts entirely. > > http://reviews.llvm.org/D12667 > > Files: > CMakeLists.txt > cmake/modules/LLDBConfig.cmake > scripts/CMakeLists.txt > > Index: scripts/CMakeLists.txt > === > --- scripts/CMakeLists.txt > +++ scripts/CMakeLists.txt > @@ -9,49 +9,26 @@ >${LLDB_SOURCE_DIR}/include/lldb/lldb-versioning.h > ) > > -if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION ) > - find_package(SWIG REQUIRED) > - add_custom_command( > -OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > -DEPENDS ${SWIG_SOURCES} > -DEPENDS ${SWIG_INTERFACES} > -DEPENDS ${SWIG_HEADERS} > -DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.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 > -COMMENT "Python script building LLDB Python wrapper") > - > set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > PROPERTIES GENERATED 1) > +find_package(SWIG REQUIRED) > +add_custom_command( > + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > + DEPENDS ${SWIG_SOURCES} > + DEPENDS ${SWIG_INTERFACES} > + DEPENDS ${SWIG_HEADERS} > + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.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 > + COMMENT "Python script building LLDB Python wrapper") > +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > PROPERTIES GENERATED 1) > > - add_custom_target(swig_wrapper ALL > -DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > -) > +add_custom_target(swig_wrapper ALL > + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > + ) > > - # Install the LLDB python module on all operating systems (except > Windows) > - if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") > -install(DIRECTORY > ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} > -DESTINATION lib${LLVM_LIBDIR_SUFFIX}) > - endif() > -else () > - add_custom_command( > -OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > -DEPENDS ${SWIG_SOURCES} > - DEPENDS ${SWIG_INTERFACES} > -# swig was directly invoked on Windows (where the Python API is not > being generated) but on other platforms, we need to run the > *swig-wrapper-classes.sh shell-scripts. > -#COMMAND swig -c++ -shadow -python -I${LLDB_SOURCE_DIR}/include -I./. > -outdir ${LLDB_SOURCE_DIR}/scripts/Python -o > ${LLDB_SOURCE_DIR}/source/LLDBWrapPython.cpp > ${LLDB_SOURCE_DIR}/scripts/lldb.swig > -COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} > ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh > ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_BINARY_DIR} -m > -COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} > ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh > ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_BINARY_DIR} -m > -COMMENT "Building lldb python wrapper") > - > set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > PROPERTIES GENERATED 1) > - > - add_custom_target(swig_wrapper ALL > -DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp > -) > - > - # Install the LLDB python module on all operating systems (except > Windows) > - if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") > -install(DIRECTORY > ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} > -DESTINATION lib${LLVM_LIBDIR_SUFFIX}) > - endif() > -endif () > +# Install the LLDB python module on all operating systems (except Windows) > +if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") > + install(DIRECTORY > ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} > + DESTINATION lib${LLVM_LIBDIR_SUFFIX}) > +endif() > > # build Python modules > add_subdirectory(Python/modules) > Index: cmake/modules/LLDBConfig.cmake > === > --- cmake/modules/LLDBConfig.cmake > +++ cmake/modules/LLDBConfig.cmake > @@ -26,8 +26,6 @@ > set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_DISABLE_CU