From 22c4c349a669ab3f96ebc1f4cfd4d852d68e81f2 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 14 Feb 2018 15:19:12 +0000 Subject: [PATCH] force dwarf-2 debug format if used assembler does not support stabs (as indicated by new af_no_stabs flag) git-svn-id: trunk@38239 - --- compiler/options.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/options.pas b/compiler/options.pas index d3600508f1..d88a357f6b 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -3875,6 +3875,14 @@ begin option.paratargetdbg:=dbg_none; exclude(init_settings.moduleswitches,cs_debuginfo); end; + { Some assemblers, like clang, do not support + stabs debugging format, switch to dwardé in that case } + if (af_no_stabs in asminfos[option.paratargetasm]^.flags) and + (option.paratargetdbg=dbg_stabs) then + begin + option.paratargetdbg:=dbg_dwarf2; + end; + end; {TOptionheck a second time as we might have changed assembler just above } option.checkoptionscompatibility;