Skip to content

Commit

Permalink
Merge pull request #628 from rust-lang/restore-llvm-fix
Browse files Browse the repository at this point in the history
Restore LLVM fix
  • Loading branch information
jdno authored Oct 30, 2024
2 parents a1f9554 + bf2fd22 commit af3c35b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions ansible/roles/dev-desktop/tasks/fix_llvm_55575.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---

# lldb 14 fails to load Python modules due to a wrong path. The workaround for
# this issue is to symlink the modules to the path that lldb expects.
# https://github.com/llvm/llvm-project/issues/55575
#
# This fix can be removed once we move to llvm 16

- name: Find all lldb Python files
ansible.builtin.find:
paths: /usr/lib/llvm-14/lib/python3.12/dist-packages/lldb
file_type: file
register: lldb_python_files

- name: Find all lldb Python modules
ansible.builtin.find:
paths: /usr/lib/llvm-14/lib/python3.12/dist-packages/lldb
file_type: directory
register: lldb_python_directories

- name: Fix llvm/llvm-project#55575
ansible.builtin.file:
src: "{{ item.path }}"
dest: "/usr/lib/python3/dist-packages/lldb/{{ item.path | basename }}"
state: link
with_items: "{{ lldb_python_files.files + lldb_python_directories.files }}"

- name: Fix lldb-server-14.0.0
ansible.builtin.file:
src: /usr/lib/llvm-14/bin/lldb-server
dest: /usr/bin/lldb-server-14.0.6
state: link
2 changes: 1 addition & 1 deletion ansible/roles/dev-desktop/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
- include_tasks: github.yml
- include_tasks: motd.yml
- include_tasks: scripts.yml
- include_tasks: services.yml
- include_tasks: fix_llvm_55575.yml

0 comments on commit af3c35b

Please sign in to comment.