Browse Source

* enable the WASM internal linker, in case the compiler is compiled with the ENABLE_WASM_INTERNAL_LINKER define

Nikolay Nikolov 1 year ago
parent
commit
7879387861
2 changed files with 8 additions and 2 deletions
  1. 4 2
      compiler/ppcwasm32.lpi
  2. 4 0
      compiler/systems/i_wasi.pas

+ 4 - 2
compiler/ppcwasm32.lpi

@@ -65,12 +65,14 @@
       <CustomOptions Value="-dwasm32
 -dnoopt
 -dEXTDEBUG
--dDEBUG_WASM_GOTO"/>
-      <OtherDefines Count="4">
+-dDEBUG_WASM_GOTO
+-dENABLE_WASM_INTERNAL_LINKER"/>
+      <OtherDefines Count="5">
         <Define0 Value="wasm32"/>
         <Define1 Value="noopt"/>
         <Define2 Value="EXTDEBUG"/>
         <Define3 Value="DEBUG_WASM_GOTO"/>
+        <Define4 Value="ENABLE_WASM_INTERNAL_LINKER"/>
       </OtherDefines>
     </Other>
   </CompilerOptions>

+ 4 - 0
compiler/systems/i_wasi.pas

@@ -79,7 +79,11 @@ unit i_wasi;
             dirsep       : '/';
             assem        : as_wasm32_wasm;
             assemextern  : as_wasm32_llvm_mc;
+{$ifdef ENABLE_WASM_INTERNAL_LINKER}
+            link         : ld_int_wasi;
+{$else ENABLE_WASM_INTERNAL_LINKER}
             link         : ld_none;
+{$endif ENABLE_WASM_INTERNAL_LINKER}
             linkextern   : ld_wasi;
             ar           : ar_none;
             res          : res_none;