mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:06:18 +02:00
+ implemented TWasmExeOutput.GenerateLibraryImports
This commit is contained in:
parent
b88b8efbce
commit
541bd66a6c
@ -227,6 +227,7 @@ interface
|
|||||||
public
|
public
|
||||||
constructor create;override;
|
constructor create;override;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
|
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWasmAssembler }
|
{ TWasmAssembler }
|
||||||
@ -4034,6 +4035,31 @@ implementation
|
|||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWasmExeOutput.GenerateLibraryImports(ImportLibraryList: TFPHashObjectList);
|
||||||
|
var
|
||||||
|
i, j: Integer;
|
||||||
|
ImportLibrary: TImportLibrary;
|
||||||
|
ImportSymbol: TImportSymbol;
|
||||||
|
exesym: TExeSymbol;
|
||||||
|
begin
|
||||||
|
for i:=0 to ImportLibraryList.Count-1 do
|
||||||
|
begin
|
||||||
|
ImportLibrary:=TImportLibrary(ImportLibraryList[i]);
|
||||||
|
for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
|
||||||
|
begin
|
||||||
|
ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
|
||||||
|
exesym:=TExeSymbol(ExeSymbolList.Find(ImportSymbol.MangledName));
|
||||||
|
if assigned(exesym) and
|
||||||
|
(exesym.State<>symstate_defined) then
|
||||||
|
begin
|
||||||
|
ImportSymbol.CachedExeSymbol:=exesym;
|
||||||
|
exesym.State:=symstate_defined;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
PackUnresolvedExeSymbols('after module imports');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TWasmAssembler
|
TWasmAssembler
|
||||||
|
Loading…
Reference in New Issue
Block a user