Browse Source

+ declare the __FPC_exception tag, when compiling with native WebAssembly
exceptions

Nikolay Nikolov 3 years ago
parent
commit
288f79cb3b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/wasm32/agllvmmc.pas

+ 2 - 0
compiler/wasm32/agllvmmc.pas

@@ -156,6 +156,8 @@ implementation
       writer.AsmWriteLn(#9'.globaltype'#9+STACK_POINTER_SYM+', i32');
       writer.AsmWriteLn(#9'.globaltype'#9+STACK_POINTER_SYM+', i32');
       { print all global procedures/functions }
       { print all global procedures/functions }
       WriteImports;
       WriteImports;
+      if ts_wasm_native_exceptions in current_settings.targetswitches then
+        writer.AsmWriteLn(#9'.tagtype'#9'__FPC_exception');
       inherited;
       inherited;
     end;
     end;