Skip to content

Commit

Permalink
vadimcn.vscode-lldb.adapter: fix passthru adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Dec 5, 2023
1 parent 4679e36 commit a8bb784
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ let
"--bin=codelldb"
];

postFixup = ''
mkdir -p $out/share
# codelldb expects libcodelldb.so to be in the same
# directory as the executable, and can't find it in $out/lib.
# To make codelldb executable as a standalone,
# we put all files in $out/share, and then wrap the binary in $out/bin.
mv $out/bin/* $out/share
cp $out/lib/* $out/share
ln -s ${lldb.lib} $out/lldb
makeWrapper $out/share/codelldb $out/bin/codelldb \
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
'';

patches = [ ./adapter-output-shared_object.patch ];

# Tests are linked to liblldb but it is not available here.
Expand Down Expand Up @@ -112,7 +125,7 @@ in stdenv.mkDerivation {
mkdir -p $ext/{adapter,formatters}
mv -t $ext vsix-extracted/extension/*
cp -t $ext/adapter ${adapter}/{bin,lib}/*
cp -t $ext/adapter ${adapter}/share/*
cp -r ../adapter/scripts $ext/adapter
wrapProgram $ext/adapter/codelldb \
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
Expand Down

0 comments on commit a8bb784

Please sign in to comment.