Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #61827 - golddranks:lldb_fix, r=nikomatsakis
Fix rust-lldb wrapper scripts. Currently the `rust-lldb` wrapper provided by Rust project is broken. The error messages it produces on launch are as follows: ``` warning: ignoring unknown option: --one-line-before-file=command script import "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py" warning: ignoring unknown option: --one-line-before-file=type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust warning: ignoring unknown option: --one-line-before-file=type category enable Rust (lldb) target create "target/debug/nagare" Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module> class SBAddress(object): File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress __swig_getmethods__["module"] = GetModule NameError: name '__swig_getmethods__' is not defined Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'run_one_line' is not defined Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'run_one_line' is not defined Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'run_one_line' is not defined ...etc. ``` The errors stem from two regressions: one caused by an LLVM upgrade and one caused by unintended upgrade to SWIG 4.0 (SWIG is a wrapper generator that is used to generate Python bindings for LLVM and LLDB.) (Edit: found the exact dates) The SWIG breakage happened because of a Homebrew version upgrade on `nightly-2019-05-01-x86_64-apple-darwin` and the LLVM breakage happened on `nightly-2019-01-27-x86_64-apple-darwin` (likely to have been caused by #57675 ). The fix is to update the LLVM parameter syntax and to "downgrade" to SWIG 3.0.x. SWIG 3.0.x is not going to be supported by Homebrew forever, but should be good for now, until LLDB upgrades to support SWIG 4.0.0. Here's some more info about Homebrew support: Homebrew/homebrew-core#39929 & Homebrew/homebrew-core#40882 I'm going to send a bug & fix to LLDB about SWIG 4.0.0 to get the situation fixed in the future. It would be good to also backport this to beta, since it's such a small change, and will fix an obvious regression.
- Loading branch information