From 4f35aabebb6fe0b33effebe1764df8fe7d470942 Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 26 Jan 2007 05:06:37 +0000 Subject: [PATCH] + use new assembler flag: af_no_debug git-svn-id: trunk@6196 - --- compiler/i386/ag386nsm.pas | 12 ++++++------ compiler/options.pas | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/compiler/i386/ag386nsm.pas b/compiler/i386/ag386nsm.pas index a7d893ff5b..bfca1a9b7e 100644 --- a/compiler/i386/ag386nsm.pas +++ b/compiler/i386/ag386nsm.pas @@ -833,7 +833,7 @@ interface asmbin : 'nasm'; asmcmd : '-f coff -o $OBJ $ASM'; supported_target : system_i386_go32v2; - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); @@ -845,7 +845,7 @@ interface asmbin : 'nasm'; asmcmd : '-f win32 -o $OBJ $ASM'; supported_target : system_i386_win32; - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); @@ -857,7 +857,7 @@ interface asmbin : 'nasm'; asmcmd : '-f obj -o $OBJ $ASM'; supported_target : system_any; { what should I write here ?? } - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); @@ -869,7 +869,7 @@ interface asmbin : 'nasm'; asmcmd : '-f win32 -o $OBJ $ASM'; supported_target : system_i386_wdosx; - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); @@ -882,7 +882,7 @@ interface asmbin : 'nasm'; asmcmd : '-f elf -o $OBJ $ASM'; supported_target : system_i386_linux; - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); @@ -894,7 +894,7 @@ interface asmbin : 'nasm'; asmcmd : '-f elf -o $OBJ $ASM'; supported_target : system_i386_beos; - flags : [af_allowdirect,af_needar]; + flags : [af_allowdirect,af_needar,af_no_debug]; labelprefix : '..@'; comment : '; '; ); diff --git a/compiler/options.pas b/compiler/options.pas index 0934bb8585..33d9e443b8 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -2220,10 +2220,6 @@ begin objectsearchpath.AddList(unitsearchpath,false); librarysearchpath.AddList(unitsearchpath,false); - { maybe override debug info format } - if (paratargetdbg<>dbg_none) then - set_target_dbg(paratargetdbg); - { maybe override assembler } if (paratargetasm<>as_none) then begin @@ -2233,8 +2229,20 @@ begin set_target_asm(target_info.assemextern); Message1(option_asm_forced,target_asm.idtxt); end; + if (af_no_debug in asminfos[paratargetasm]^.flags) and + (paratargetdbg<>dbg_none) then + begin + Message1(option_confict_asm_debug, + asminfos[paratargetasm]^.idtxt); + paratargetdbg:=dbg_none; + exclude(init_settings.moduleswitches,cs_debuginfo); + end; end; + { maybe override debug info format } + if (paratargetdbg<>dbg_none) then + set_target_dbg(paratargetdbg); + { switch assembler if it's binary and we got -a on the cmdline } if (cs_asm_leave in init_settings.globalswitches) and (af_outputbinary in target_asm.flags) then