mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 09:29:35 +02:00
+ implemented TWasmExeOutput.GenerateLibraryImports
This commit is contained in:
parent
b88b8efbce
commit
541bd66a6c
@ -227,6 +227,7 @@ interface
|
||||
public
|
||||
constructor create;override;
|
||||
destructor destroy;override;
|
||||
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
||||
end;
|
||||
|
||||
{ TWasmAssembler }
|
||||
@ -4034,6 +4035,31 @@ implementation
|
||||
inherited destroy;
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user