diff --git a/compiler/systems/t_embed.pas b/compiler/systems/t_embed.pas index d9f2a78448..ce0c9fc12b 100644 --- a/compiler/systems/t_embed.pas +++ b/compiler/systems/t_embed.pas @@ -2185,7 +2185,7 @@ function TLinkerEmbedded_Wasm.MakeSharedLibrary: boolean; SoNameStr:=''; SplitBinCmd(Info.DllCmd[1],binstr,cmdstr); - Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename)); + Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename)); tmp := TCmdStrListItem(ObjectFiles.First); while Assigned(tmp) do begin