소스 검색

* WebAssembly internal linker: only generate the tag name subsection if there
are any tags in the module

Nikolay Nikolov 1 년 전
부모
커밋
130d1e9d40
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      compiler/ogwasm.pas

+ 5 - 2
compiler/ogwasm.pas

@@ -5174,8 +5174,11 @@ implementation
           WriteNameMap(FDataNameMap,FWasmNameSubsections[wnstDataNames]);
           WriteNameSubsection(wnstDataNames);
 
-          WriteNameMap(FTagNameMap,FWasmNameSubsections[wnstTagNames]);
-          WriteNameSubsection(wnstTagNames);
+          if Length(FTagNameMap)>0 then
+            begin
+              WriteNameMap(FTagNameMap,FWasmNameSubsections[wnstTagNames]);
+              WriteNameSubsection(wnstTagNames);
+            end;
         end;
 
       var