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 Nov 27, 2023
1 parent 2ba4153 commit 66ca0c0
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ let
"--bin=codelldb"
];

postFixup = ''
wrapProgram $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 @@ -126,7 +131,18 @@ in stdenv.mkDerivation {
'';

passthru = {
inherit lldb adapter;
inherit lldb;
adapter = adapter.overrideAttrs (oa: {
postFixup = ''
wrapProgram $out/bin/codelldb \
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server" \
--add-flags "--liblldb" --add-flags "${lldb.lib}/lib/liblldb.so"
# XXX: codelldb expects libcodelldb.so to be in the same
# directory as the executable, and can't find it in $out/lib.
# This is necessary to make codelldb executable as a standalone.
ln -s $out/lib/libcodelldb.so $out/bin/libcodelldb.so
'';
});
updateScript = ./update.sh;
};

Expand Down

0 comments on commit 66ca0c0

Please sign in to comment.