From bb3b1b06a735f552b0861973710a6dfcad99ed98 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Thu, 21 Nov 2019 21:45:15 +0000 Subject: [PATCH] * fix condition for including a unit's object files or not when compiling with packages git-svn-id: trunk@43550 - --- compiler/pmodules.pas | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas index 2edd2d2026..a285bfe663 100644 --- a/compiler/pmodules.pas +++ b/compiler/pmodules.pas @@ -2475,18 +2475,7 @@ type hp:=tmodule(loaded_units.first); while assigned(hp) do begin - if (hp<>sysinitmod) { - I commented the following condition as it breaks linking with units being shared libs. - The needed shared libs and object files are ignored - - and ((hp.headerflags and uf_in_library)=0) - - I think the right condition is - - not(assigned(hp.package)) - - as later on for packages the right shared libs are added separately (FK) - } then + if (hp<>sysinitmod) and not assigned(hp.package) then begin linker.AddModuleFiles(hp); if mf_checkpointer_called in hp.moduleflags then