Browse Source

* removed DLLsource global variable and replaced its uses with
current_module.islibrary

git-svn-id: trunk@32676 -

Jonas Maebe 9 years ago
parent
commit
7a8079cfb4
6 changed files with 5 additions and 9 deletions
  1. 0 3
      compiler/globals.pas
  2. 1 1
      compiler/hlcgobj.pas
  3. 1 1
      compiler/link.pas
  4. 1 2
      compiler/pmodules.pas
  5. 1 1
      compiler/psub.pas
  6. 1 1
      compiler/symsym.pas

+ 0 - 3
compiler/globals.pas

@@ -344,8 +344,6 @@ interface
        prop_auto_setter_prefix : string;
 
     const
-       DLLsource : boolean = false;
-
        Inside_asm_statement : boolean = false;
 
        global_unit_count : word = 0;
@@ -1362,7 +1360,6 @@ implementation
         do_make:=true;
         compile_level:=0;
         codegenerror:=false;
-        DLLsource:=false;
 
         { Output }
         OutputFileName:='';

+ 1 - 1
compiler/hlcgobj.pas

@@ -4652,7 +4652,7 @@ implementation
           look up procdef, use hlcgobj.a_call_name()) }
 
       { call __EXIT for main program }
-      if (not DLLsource) and
+      if (not current_module.islibrary) and
          (current_procinfo.procdef.proctypeoption=potype_proginit) then
         g_call_system_proc(list,'fpc_do_exit',[],nil);
     end;

+ 1 - 1
compiler/link.pas

@@ -754,7 +754,7 @@ Implementation
          begin
            if showinfo then
              begin
-               if DLLsource then
+               if current_module.islibrary then
                  AsmRes.AddLinkCommand(Command,Para,current_module.sharedlibfilename)
                else
                  AsmRes.AddLinkCommand(Command,Para,current_module.exefilename);

+ 1 - 2
compiler/pmodules.pas

@@ -1977,7 +1977,6 @@ type
          i : Longint;
          sysinitmod: tmodule;
       begin
-         DLLsource:=islibrary;
          Status.IsLibrary:=IsLibrary;
          Status.IsPackage:=false;
          Status.IsExe:=true;
@@ -2448,7 +2447,7 @@ type
                  if not needsymbolinfo then
                    unloaded_units.Clear;
                  { finally we can create a executable }
-                 if DLLSource then
+                 if current_module.islibrary then
                    linker.MakeSharedLibrary
                  else
                    linker.MakeExecutable;

+ 1 - 1
compiler/psub.pas

@@ -1315,7 +1315,7 @@ implementation
           begin
             include(flags,pi_do_call);
             { the main program never returns due to the do_exit call }
-            if not(DLLsource) then
+            if not(current_module.islibrary) then
               include(procdef.procoptions,po_noreturn);
           end;
 

+ 1 - 1
compiler/symsym.pas

@@ -1852,7 +1852,7 @@ implementation
           (owner.symtabletype=globalsymtable) or
           (create_smartlink and
            not(tf_smartlink_sections in target_info.flags)) or
-          DLLSource or
+          current_module.islibrary or
           (assigned(current_procinfo) and
            ((po_inline in current_procinfo.procdef.procoptions) or
             { globalasmsym is called normally before the body of a subroutine is parsed