Browse Source

* set and use ExeCmd instead of DllCmd when making an WASI executable

Nikolay Nikolov 3 years ago
parent
commit
f01c841190
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/systems/t_wasi.pas

+ 2 - 1
compiler/systems/t_wasi.pas

@@ -96,6 +96,7 @@ procedure tlinkerwasi.SetDefaultInfo;
 begin
   with Info do
     begin
+      ExeCmd[1] := 'wasm-ld $SONAME $GCSECTIONS $MAP -o $EXE';
       DllCmd[1] := 'wasm-ld $SONAME $GCSECTIONS $MAP -o $EXE';
     end;
 end;
@@ -132,7 +133,7 @@ begin
     GCSectionsStr:='';
 
   SoNameStr:='';
-  SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
+  SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
   Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename));
 
   tmp := TCmdStrListItem(ObjectFiles.First);