From db980a5d18d1de83a9ceccad8ce9e283d58484f9 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Thu, 14 Jul 2022 20:29:41 +0300 Subject: [PATCH] + add the "-m wasm32" parameter to the linker, when linking for the WASI target. No idea if it does anything, but is passed to the linker by the official WASI SDK, so it shouldn't hurt. --- compiler/systems/t_wasi.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/systems/t_wasi.pas b/compiler/systems/t_wasi.pas index 1b2eadc8df..7b6f303b11 100644 --- a/compiler/systems/t_wasi.pas +++ b/compiler/systems/t_wasi.pas @@ -96,8 +96,8 @@ 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'; + ExeCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -o $EXE'; + DllCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -o $EXE'; end; end;