mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:30:36 +02:00
+ allow changing the stack size for the WASI platform
This commit is contained in:
parent
c910ec814c
commit
4e3c170ad4
@ -96,8 +96,8 @@ procedure tlinkerwasi.SetDefaultInfo;
|
|||||||
begin
|
begin
|
||||||
with Info do
|
with Info do
|
||||||
begin
|
begin
|
||||||
ExeCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -o $EXE';
|
ExeCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -z stack-size=$STACKSIZE -o $EXE';
|
||||||
DllCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -o $EXE';
|
DllCmd[1] := 'wasm-ld -m wasm32 $SONAME $GCSECTIONS $MAP -z stack-size=$STACKSIZE -o $EXE';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ begin
|
|||||||
|
|
||||||
if ts_wasm_threads in current_settings.targetswitches then
|
if ts_wasm_threads in current_settings.targetswitches then
|
||||||
begin
|
begin
|
||||||
cmdstr := cmdstr + ' --import-memory --shared-memory --initial-memory=16777216 --max-memory=16777216 -z stack-size=5242880 --global-base=1024';
|
cmdstr := cmdstr + ' --import-memory --shared-memory --initial-memory=16777216 --max-memory=16777216 --global-base=1024';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (cs_link_strip in current_settings.globalswitches) then
|
if (cs_link_strip in current_settings.globalswitches) then
|
||||||
@ -165,6 +165,7 @@ begin
|
|||||||
//Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
//Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||||
//Replace(cmdstr,'$INIT',InitStr);
|
//Replace(cmdstr,'$INIT',InitStr);
|
||||||
//Replace(cmdstr,'$FINI',FiniStr);
|
//Replace(cmdstr,'$FINI',FiniStr);
|
||||||
|
Replace(cmdstr,'$STACKSIZE',tostr(stacksize));
|
||||||
Replace(cmdstr,'$SONAME',SoNameStr);
|
Replace(cmdstr,'$SONAME',SoNameStr);
|
||||||
Replace(cmdstr,'$MAP',mapstr);
|
Replace(cmdstr,'$MAP',mapstr);
|
||||||
//Replace(cmdstr,'$LTO',ltostr);
|
//Replace(cmdstr,'$LTO',ltostr);
|
||||||
@ -226,6 +227,7 @@ begin
|
|||||||
//Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
//Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||||
//Replace(cmdstr,'$INIT',InitStr);
|
//Replace(cmdstr,'$INIT',InitStr);
|
||||||
//Replace(cmdstr,'$FINI',FiniStr);
|
//Replace(cmdstr,'$FINI',FiniStr);
|
||||||
|
Replace(cmdstr,'$STACKSIZE',tostr(stacksize));
|
||||||
Replace(cmdstr,'$SONAME',SoNameStr);
|
Replace(cmdstr,'$SONAME',SoNameStr);
|
||||||
Replace(cmdstr,'$MAP',mapstr);
|
Replace(cmdstr,'$MAP',mapstr);
|
||||||
//Replace(cmdstr,'$LTO',ltostr);
|
//Replace(cmdstr,'$LTO',ltostr);
|
||||||
|
Loading…
Reference in New Issue
Block a user