Browse Source

Don't link objects files of a unit that is provided by a package.

pmodules.pas, proc_program:
  * if a unit has uf_in_library set we must not include it in the units we link against

git-svn-id: branches/svenbarth/packages@28852 -
svenbarth 11 years ago
parent
commit
3d8a43e5f2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/pmodules.pas

+ 2 - 1
compiler/pmodules.pas

@@ -2091,7 +2091,8 @@ type
                  hp:=tmodule(loaded_units.first);
                  while assigned(hp) do
                   begin
-                    linker.AddModuleFiles(hp);
+                    if hp.flags and uf_in_library=0 then
+                      linker.AddModuleFiles(hp);
                     hp2:=tmodule(hp.next);
                     if (hp<>current_module) and
                        (not needsymbolinfo) then