mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 10:39:23 +02:00
+ always (even when multithreading is off) create a "target features" section
in the WebAssembly object writer, since we still require some (very commonly supported) extensions, even without multithreading
This commit is contained in:
parent
bf17a84dd2
commit
972a9df031
@ -1844,6 +1844,14 @@ implementation
|
||||
WriteName(FWasmCustomSections[wcstTargetFeatures],'mutable-globals');
|
||||
WriteUleb(FWasmCustomSections[wcstTargetFeatures],$2B);
|
||||
WriteName(FWasmCustomSections[wcstTargetFeatures],'sign-ext');
|
||||
end
|
||||
else
|
||||
begin
|
||||
WriteUleb(FWasmCustomSections[wcstTargetFeatures],2);
|
||||
WriteUleb(FWasmCustomSections[wcstTargetFeatures],$2B);
|
||||
WriteName(FWasmCustomSections[wcstTargetFeatures],'bulk-memory');
|
||||
WriteUleb(FWasmCustomSections[wcstTargetFeatures],$2B);
|
||||
WriteName(FWasmCustomSections[wcstTargetFeatures],'sign-ext');
|
||||
end;
|
||||
|
||||
{ Write the producers section:
|
||||
@ -1999,11 +2007,8 @@ implementation
|
||||
MaybeWriteRelocationDebugTable(wcstRelocDebugRanges,debug_ranges_section_nr,FWasmRelocationDebugRangesTableEntriesCount,FWasmRelocationDebugRangesTable);
|
||||
WriteWasmCustomSection(wcstProducers);
|
||||
Inc(section_nr);
|
||||
if ts_wasm_threads in current_settings.targetswitches then
|
||||
begin
|
||||
WriteWasmCustomSection(wcstTargetFeatures);
|
||||
Inc(section_nr);
|
||||
end;
|
||||
WriteWasmCustomSection(wcstTargetFeatures);
|
||||
Inc(section_nr);
|
||||
|
||||
result:=true;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user