diff options
author | Zachary Turner <zturner@google.com> | 2015-10-27 20:12:05 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-10-27 20:12:05 +0000 |
commit | 0a0490b1520e96b728448b8c43ca873fcaa809dc (patch) | |
tree | d86351542362fcd3187d40fdfb0ccb939ac2f99a /lldb/use_lldb_suite_root.py | |
parent | 235acde953856a52b692cecf2c0484f2c30fdf43 (diff) | |
download | bcm5719-llvm-0a0490b1520e96b728448b8c43ca873fcaa809dc.tar.gz bcm5719-llvm-0a0490b1520e96b728448b8c43ca873fcaa809dc.zip |
Rename `lldb_shared` to `use_lldb_suite`.
llvm-svn: 251444
Diffstat (limited to 'lldb/use_lldb_suite_root.py')
-rw-r--r-- | lldb/use_lldb_suite_root.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/use_lldb_suite_root.py b/lldb/use_lldb_suite_root.py new file mode 100644 index 00000000000..466de5d7a4a --- /dev/null +++ b/lldb/use_lldb_suite_root.py @@ -0,0 +1,15 @@ +import inspect +import os +import sys + +def add_third_party_module_dirs(lldb_root): + third_party_modules_dir = os.path.join(lldb_root, "third_party", "Python", "module") + if not os.path.isdir(third_party_modules_dir): + return + + module_dirs = os.listdir(third_party_modules_dir) + for module_dir in module_dirs: + module_dir = os.path.join(third_party_modules_dir, module_dir) + sys.path.insert(0, module_dir) +lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe())) +add_third_party_module_dirs(lldb_root) |