Przeglądaj źródła

+ use new assembler flag: af_no_debug

git-svn-id: trunk@6196 -
pierre 18 lat temu
rodzic
commit
4f35aabebb
2 zmienionych plików z 18 dodań i 10 usunięć
  1. 6 6
      compiler/i386/ag386nsm.pas
  2. 12 4
      compiler/options.pas

+ 6 - 6
compiler/i386/ag386nsm.pas

@@ -833,7 +833,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f coff -o $OBJ $ASM';
             asmcmd : '-f coff -o $OBJ $ASM';
             supported_target : system_i386_go32v2;
             supported_target : system_i386_go32v2;
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );
@@ -845,7 +845,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f win32 -o $OBJ $ASM';
             asmcmd : '-f win32 -o $OBJ $ASM';
             supported_target : system_i386_win32;
             supported_target : system_i386_win32;
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );
@@ -857,7 +857,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f obj -o $OBJ $ASM';
             asmcmd : '-f obj -o $OBJ $ASM';
             supported_target : system_any; { what should I write here ?? }
             supported_target : system_any; { what should I write here ?? }
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );
@@ -869,7 +869,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f win32 -o $OBJ $ASM';
             asmcmd : '-f win32 -o $OBJ $ASM';
             supported_target : system_i386_wdosx;
             supported_target : system_i386_wdosx;
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );
@@ -882,7 +882,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f elf -o $OBJ $ASM';
             asmcmd : '-f elf -o $OBJ $ASM';
             supported_target : system_i386_linux;
             supported_target : system_i386_linux;
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );
@@ -894,7 +894,7 @@ interface
             asmbin : 'nasm';
             asmbin : 'nasm';
             asmcmd : '-f elf -o $OBJ $ASM';
             asmcmd : '-f elf -o $OBJ $ASM';
             supported_target : system_i386_beos;
             supported_target : system_i386_beos;
-            flags : [af_allowdirect,af_needar];
+            flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
           );
           );

+ 12 - 4
compiler/options.pas

@@ -2220,10 +2220,6 @@ begin
   objectsearchpath.AddList(unitsearchpath,false);
   objectsearchpath.AddList(unitsearchpath,false);
   librarysearchpath.AddList(unitsearchpath,false);
   librarysearchpath.AddList(unitsearchpath,false);
 
 
-  { maybe override debug info format }
-  if (paratargetdbg<>dbg_none) then
-    set_target_dbg(paratargetdbg);
-
   { maybe override assembler }
   { maybe override assembler }
   if (paratargetasm<>as_none) then
   if (paratargetasm<>as_none) then
     begin
     begin
@@ -2233,8 +2229,20 @@ begin
           set_target_asm(target_info.assemextern);
           set_target_asm(target_info.assemextern);
           Message1(option_asm_forced,target_asm.idtxt);
           Message1(option_asm_forced,target_asm.idtxt);
         end;
         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;
     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 }
   { switch assembler if it's binary and we got -a on the cmdline }
   if (cs_asm_leave in init_settings.globalswitches) and
   if (cs_asm_leave in init_settings.globalswitches) and
      (af_outputbinary in target_asm.flags) then
      (af_outputbinary in target_asm.flags) then