summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/finishSwigWrapperClasses.py
Commit message (Collapse)AuthorAgeFilesLines
* Install six.py conditionallyKamil Rytarowski2017-02-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | Summary: The current version of LLDB installs six.py into global python library directory. This approach produces conflicts downstream with distribution's py-six copy. Introduce new configure option LLDB_USE_SYSTEM_SIX (disabled by default). Once specified as TRUE, six.py won't be installed to Python's directory. Add new option in finishSwigWrapperClasses.py, namely --useSystemSix. Sponsored by <The NetBSD Foundation> Reviewers: mgorny, emaste, clayborg, joerg, labath Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29405 llvm-svn: 294071
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-26/+58
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Create _lldb python symlink correctly when LLVM_LIBDIR_SUFFIX is usedFrancis Ricci2016-04-251-3/+8
| | | | | | | | | | | | | | | | Summary: Do not assume that liblldb.so is located in $(lldb -P)/../../../lib when creating the _lldb python symlink. Instead, use the path passed to LLVM_LIBDIR_SUFFIX, defaulting to $(lldb -P)/../../../lib when this variable is not set. Reviewers: vharron, emaste, zturner Subscribers: zturner, labath, lldb-commits, sas Differential Revision: http://reviews.llvm.org/D19067 llvm-svn: 267462
* Be *stupider* about what constitutes a supported language binding.Zachary Turner2015-11-251-18/+1
| | | | | | | | | | | | | | | We were trying to be super smart and find all the supported language bindings. This led to us scanning the directory and treating all subdirectories as language binding directories. This makes it hard to add unrelated code in this folder. Besides, we only support one at the moment - Python. And when new ones are added it will be trivial to just add their names to a list. So this patch gets stupider about how to look for language binding subfolders. Just put them in a list, and use the list. llvm-svn: 254078
* Another hack to fix the build bot.Zachary Turner2015-11-241-1/+1
| | | | | | | | | This script really should not be assuming every subdirectory is a language directory for swig generation. Using a hack to get this working for now, but this should be solved once this script is re-written similar to how prepare_bindings was. llvm-svn: 254037
* [swig] Start of pylint on python build scripts.Bruce Mitchener2015-11-051-113/+112
| | | | | | | | | | | | | | | | | | | | | | | Summary: This does a broad first pass on cleaning up a lot of the noise when using pylint on these scripts. It mostly addresses issues of: * Mixed tabs and spaces. * Trailing whitespace. * Semicolons where they aren't needed. * Incorrect whitespace around () and []. * Superfluous parentheses. There will be subsequent patches with further changes that build upon these. Reviewers: zturner, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14375 llvm-svn: 252244
* Revert "Python 3 - Don't add the _d suffix to the symlink on Windows."Zachary Turner2015-11-041-2/+0
| | | | | | | | | | | | This reverts commit e59c95ca936f5a0a8abb987b8605fd8bf82b03b6. This was a mistake on my part. The real problem was with my environment. I was using a release interpreter to try to load my debug extension module. I noticed this after I finally managed to get into my extension module's init method, and then it segfaulted with heap errors due to mismatched CRT (debug vs. release) llvm-svn: 252030
* Python 3 - Don't add the _d suffix to the symlink on Windows.Zachary Turner2015-11-041-0/+2
| | | | | | | | | | | In Python 2, a debug extension module required an _d suffix, so for example the extension module `_lldb` would be backed by the file `_lldb_d.pyd` if built in debug mode, and `_lldb.pyd` if built in release mode. In Python 2, although undocumented, this seems to no longer be the case, and even for a debug extension module, the interpreter will only look for the `_lldb.pyd` name. llvm-svn: 252026
* Run py2to3 on lldb/scripts folder.Zachary Turner2015-10-191-5/+5
| | | | | | | This mostly fixes some print statements, but there were also some instances of dict.iteritems() lingering that this found. llvm-svn: 250762
* Make swig generation python scripts python 3 compatible.Zachary Turner2015-10-161-3/+3
| | | | llvm-svn: 250532
* Update swig generation scripts to support Python 3.Zachary Turner2015-10-061-11/+13
| | | | llvm-svn: 249467
* Ignore the .svn directory when building swig wrappers (bug #23917)Pavel Labath2015-06-291-0/+3
| | | | llvm-svn: 240942
* Start to share SWIG interface files between languages.Bruce Mitchener2015-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: Move scripts/Python/interface to scripts/interface so that we can start making iterative improvements towards sharing the interface files between multiple languages (each of which would have their own directory as now). Test Plan: Build and see. Reviewers: zturner, emaste, clayborg Reviewed By: clayborg Subscribers: mjsabby, lldb-commits Differential Revision: http://reviews.llvm.org/D9212 llvm-svn: 235676
* Use the debugginess of the python interpreter when symlinking _lldb.pyd.Zachary Turner2015-04-221-2/+1
| | | | | | | | | | | | | | Previously we would pass an argument to finishSwigWrapperClasses.py which specified whether this was a debug or a release build. But sometimes CMAKE_BUILD_TYPE would not be set to anything, causing this argument to be empty when passed in. The only purpose of this argument was to determine whether or not to append _d to the extension module when creating the symlink. This is only necessary when doing a debug build of LLDB on Windows, which implies a debug interpreter, so we replace this with a check to see if the running interpreter is a debug one, and append _d if so. llvm-svn: 235559
* Don't use literal slashes when concatenating paths in Python.Zachary Turner2015-04-031-4/+3
| | | | | | | | This patch fixes the swig generation scripts to use os.path.join instead, which produces correctly normalized paths for platforms that don't use the standard forward slash separator. llvm-svn: 234030
* Remove non-standard Environment header sectionEd Maste2015-03-231-5/+0
| | | | llvm-svn: 232973
* Avoid output on successful execution of the SWIG scriptsEd Maste2015-03-201-4/+2
| | | | | | | Standard practice for tools like this upon success is no output and a zero return value. llvm-svn: 232841
* Fixup whitespace in finishSwigWrapperClasses.pyEd Maste2015-03-201-310/+310
| | | | | | | - replace hard tabs with 4-space indents - delete EOL whitespace llvm-svn: 232840
* Create an _d suffixed symlink when doing a debug Windows build.Zachary Turner2014-07-171-1/+2
| | | | | | | | | | | _lldb is built as an extension module on Windows. Normally to load an extension module named 'foo', Python would look for the file 'foo.pyd'. However, when a debug interpreter is used, Python will look for the file 'foo_d.pyd'. This change checks the build configuration and creates the correct symlink name based on the build configuration. llvm-svn: 213306
* This creates a valid Python API for Windows, pending some issues. The ↵Deepak Panickal2014-07-011-0/+386
changes included are - - Ported the SWIG wrapper shell scripts to Python so that they would work on Windows too along with other platforms - Updated CMake handling to fix SWIG errors and manage sym-linking on Windows to liblldb.dll - More build fixes for Windows The pending issues are that two Python modules, termios and pexpect are not available on Windows. These are currently required for the Python command interpreter to be used from within LLDB. llvm-svn: 212111
OpenPOWER on IntegriCloud