Browse Source

+ write the wasm binary module header and version

Nikolay Nikolov 3 years ago
parent
commit
fd4d6b8fc3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/ogwasm.pas

+ 3 - 1
compiler/ogwasm.pas

@@ -229,7 +229,9 @@ implementation
 
 
     function TWasmObjOutput.writeData(Data:TObjData):boolean;
     function TWasmObjOutput.writeData(Data:TObjData):boolean;
       begin
       begin
-        result:=false;
+        Writer.write(WasmModuleMagic,SizeOf(WasmModuleMagic));
+        Writer.write(WasmVersion,SizeOf(WasmVersion));
+        result:=true;
       end;
       end;
 
 
     constructor TWasmObjOutput.create(AWriter: TObjectWriter);
     constructor TWasmObjOutput.create(AWriter: TObjectWriter);