2
0
Эх сурвалжийг харах

Generate unit exports only for system that need them.

systems.pas:
  + new set constant systems_packages_need_exports for systems that need package functions and types especially exported (basically all systems using PE/COFF for now...)
pmodules.pas, proc_package:
  * only generate exports on systems that need them, but walk the units nevertheless to get the system unit (ToDo: check whether this is needed)

git-svn-id: branches/svenbarth/packages@31923 -
svenbarth 9 жил өмнө
parent
commit
cbcda8bd59

+ 1 - 1
compiler/pmodules.pas

@@ -1560,7 +1560,7 @@ type
                  systemunit:=tglobalsymtable(uu.u.globalsymtable);
                  load_intern_types;
                end;
-             if not assigned(uu.u.package) then
+             if not assigned(uu.u.package) and (target_info.system in systems_packages_need_exports) then
                export_unit(uu.u);
 
              uu:=tused_unit(uu.next);

+ 3 - 0
compiler/systems.pas

@@ -298,6 +298,9 @@ interface
                                          system_x86_64_win64,
                                          system_ia64_win64]+systems_linux+systems_android;
 
+       { all systems that require exports for packages }
+       systems_packages_need_exports = [system_i386_nativent]+systems_windows;
+
        { all systems for which weak linking has been tested/is supported }
        systems_weak_linking = systems_darwin + systems_solaris + systems_linux + systems_android;