Skip to content

Commit 5b68835

Browse files
committed
Restore fix for LLVM
We encountered a bug in LLVM a while ago and implemented a workaround for the dev-desktops. This workaround accidentally got deleted when upgrading the machines to Ubuntu 24.04, since it did not seem necessary anymore. Sadly, it still is.
1 parent 44fe61d commit 5b68835

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
3+
# lldb 14 fails to load Python modules due to a wrong path. The workaround for
4+
# this issue is to symlink the modules to the path that lldb expects.
5+
# https://github.com/llvm/llvm-project/issues/55575
6+
7+
- name: Find all lldb Python files
8+
ansible.builtin.find:
9+
paths: /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb
10+
file_type: file
11+
register: lldb_python_files
12+
13+
- name: Find all lldb Python modules
14+
ansible.builtin.find:
15+
paths: /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb
16+
file_type: directory
17+
register: lldb_python_directories
18+
19+
- name: Fix llvm/llvm-project#55575
20+
ansible.builtin.file:
21+
src: "{{ item.path }}"
22+
dest: "/usr/lib/python3/dist-packages/lldb/{{ item.path | basename }}"
23+
state: link
24+
with_items: "{{ lldb_python_files.files + lldb_python_directories.files }}"
25+
26+
- name: Fix lldb-server-14.0.0
27+
ansible.builtin.file:
28+
src: /usr/lib/llvm-14/bin/lldb-server
29+
dest: /usr/bin/lldb-server-14.0.0
30+
state: link

ansible/roles/dev-desktop/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
- include_tasks: github.yml
1414
- include_tasks: motd.yml
1515
- include_tasks: scripts.yml
16-
- include_tasks: services.yml
16+
- include_tasks: fix_llvm_55575.yml

0 commit comments

Comments
 (0)