From fcf085b141dbd7ffb23f79e3bc37f52bc7b7a1ae Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 6 Aug 2020 19:04:08 +0000 Subject: [PATCH] * msdos: Include debug info only when it is enabled by options. git-svn-id: trunk@46297 - --- compiler/systems/t_msdos.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/compiler/systems/t_msdos.pas b/compiler/systems/t_msdos.pas index 2da8c06afe..5670a7b8f9 100644 --- a/compiler/systems/t_msdos.pas +++ b/compiler/systems/t_msdos.pas @@ -265,14 +265,17 @@ begin LinkRes.Add('option quiet'); - if target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then - LinkRes.Add('debug dwarf') - else if target_dbg.id=dbg_codeview then - LinkRes.Add('debug codeview') - else if cs_debuginfo in current_settings.moduleswitches then - LinkRes.Add('debug watcom all'); - if cs_link_separate_dbg_file in current_settings.globalswitches then - LinkRes.Add('option symfile'); + if cs_debuginfo in current_settings.moduleswitches then + begin + if target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then + LinkRes.Add('debug dwarf') + else if target_dbg.id=dbg_codeview then + LinkRes.Add('debug codeview') + else + LinkRes.Add('debug watcom all'); + if cs_link_separate_dbg_file in current_settings.globalswitches then + LinkRes.Add('option symfile'); + end; { add objectfiles, start with prt0 always } case current_settings.x86memorymodel of