Bläddra i källkod

* Delete main executable- or library-objectfile after linking

git-svn-id: trunk@17386 -
joost 14 år sedan
förälder
incheckning
786f0a5067
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      compiler/pmodules.pas

+ 3 - 0
compiler/pmodules.pas

@@ -2422,6 +2422,9 @@ implementation
                  else
                  else
                    linker.MakeExecutable;
                    linker.MakeExecutable;
 
 
+                 { Delete main module object file }
+                 if not(cs_link_nolink in current_settings.globalswitches) then
+                   DeleteFile(pshortstring2pchar(main_module.objfilename));
                  { collect all necessary information for whole-program optimization }
                  { collect all necessary information for whole-program optimization }
                  wpoinfomanager.extractwpoinfofromprogram;
                  wpoinfomanager.extractwpoinfofromprogram;
                end;
                end;