* ignore the '-gl' parameter on WebAssembly, since it's impossible to implement

this feature on this target. WebAssembly is a Harvard architecture and allows
  no way for inspecting code addresses in stack traces from within the program
  itself. Maybe a future extension to the WebAssembly spec would allow that, but
  currently, it's not possible. The '-gl' option is ignored (producing only a
  warning, instead of a fatal error), because not having line info should not be
  fatal for most programs. It also reduces the number of test failures, since
  many tests compile with '-gl', but don't actually require the line info, it's
  just there for debugging purposes.
This commit is contained in:
Nikolay Nikolov 2024-08-24 14:31:28 +03:00
parent 184c612f78
commit cad9cd22d3

View File

@ -3249,9 +3249,14 @@ begin
begin
if UnsetBool(More, j, opt, false) then
exclude(init_settings.globalswitches,cs_use_lineinfo)
else
begin
if target_info.system in systems_wasm then
IgnoredPara('-gl')
else
include(init_settings.globalswitches,cs_use_lineinfo);
end;
end;
'm' :
begin
paratargetdbg:=dbg_codeview;