Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions scripts/container-only/.wkdev-init
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,20 @@ try_setup_permissions_rust_directory() {
chown --recursive "${container_user_name}:${container_group_name}" "${rust_directory}" &>/dev/null
}

# Works around python issues when running scripts like this:
# python3 Tools/Scripts/dump-class-layout -t WebKitBuild/JSCOnly/Debug/lib/libJavaScriptCore.so JavaScriptCore JSC::JSCell
try_fix_lldb_py() {

local user_home

user_home=$(getent passwd "${container_user_name}" | cut -d: -f6)

sudo apt install lsb-release wget software-properties-common gnupg -y
wget -qO - https://apt.llvm.org/llvm.sh | sudo bash -s 19 -y
Copy link
Member

@TingPing TingPing Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Installing core packages doesn't belong in .wkdev-init, it would go in the dockerfile.
  2. Downloading and installing the entire llvm toolchain is a pretty massive change... Can you not get Ubuntu's LLVM 18 working?

FWIW, I use the LLDB integration in VSCode every day without issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, we should try to use the LLVM bundled with Ubuntu and find out the root cause of the issue. @justinmichaud wdyt?

sudo ln -s /usr/lib/llvm-19/lib/liblldb.so.1 /usr/lib/llvm-19/lib/liblldb.so
echo "export PYTHONPATH=/usr/lib/llvm-19/lib/python3.12/site-packages/" >> ${user_home}/.bashrc
}

try_firstrun_script() {

local user_home
Expand Down Expand Up @@ -239,6 +253,7 @@ TASKS=(
"try_setup_dockerenv_file"
"try_setup_permissions_jhbuild_directory"
"try_setup_permissions_rust_directory"
"try_fix_lldb_py"
"try_firstrun_script"
)

Expand Down
Loading