Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-11 Thread Yuriy Sydorov via fpc-pascal
On 11.03.2021 1:43, Karoly Balogh via fpc-pascal wrote: Hi, On Wed, 10 Mar 2021, Yuriy Sydorov via fpc-pascal wrote: Neither parameter may be necessary on Windows, but that's probably the only one. Android and MS-DOS targets also ignore -CX -XX * when using the internal linker... :)

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Karoly Balogh via fpc-pascal
Hi, On Wed, 10 Mar 2021, Yuriy Sydorov via fpc-pascal wrote: > > Neither parameter may be necessary on Windows, but that's probably the > > only one. > > Android and MS-DOS targets also ignore -CX -XX * when using the internal linker... :) External linkers may be supported for these targets,

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Yuriy Sydorov via fpc-pascal
On 10.03.2021 14:29, Jonas Maebe via fpc-pascal wrote: On 10/03/2021 13:17, Yuriy Sydorov via fpc-pascal wrote: On 10.03.2021 11:34, LacaK via fpc-pascal wrote: A.) I compile my (units) program/library with -CX -XX (set in Project Options) Just a small note: -CX -XX are not needed for the

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Jonas Maebe via fpc-pascal
On 10/03/2021 14:51, Michael Van Canneyt via fpc-pascal wrote: > On Wed, 10 Mar 2021, Jonas Maebe via fpc-pascal wrote: > >> On 10/03/2021 14:33, LacaK via fpc-pascal wrote: >>> It will be nice have this in documentation. For example in >>>

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread LacaK via fpc-pascal
It will be nice have this in documentation. For example in https://www.freepascal.org/docs-html/prog/progse30.html#x195-207.3 At least explain: - relation of -CX and -XX Indeed. - what is to be removed: non-referenced non-virtual methods, global variables, and regular

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Michael Van Canneyt via fpc-pascal
On Wed, 10 Mar 2021, Jonas Maebe via fpc-pascal wrote: On 10/03/2021 14:33, LacaK via fpc-pascal wrote: It will be nice have this in documentation. For example in https://www.freepascal.org/docs-html/prog/progse30.html#x195-207.3 At least explain: - relation of -CX and -XX Indeed. I

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Jonas Maebe via fpc-pascal
On 10/03/2021 14:33, LacaK via fpc-pascal wrote: > It will be nice have this in documentation. For example in > https://www.freepascal.org/docs-html/prog/progse30.html#x195-207.3 > > At least explain: > - relation of -CX and -XX Indeed. > - what is to be removed: non-referenced non-virtual

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread LacaK via fpc-pascal
It will be nice have this in documentation. For example in https://www.freepascal.org/docs-html/prog/progse30.html#x195-207.3 At least explain: - relation of -CX and -XX - what is to be removed: non-referenced non-virtual methods, global variables, and regular procedures/functions - (may

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Jonas Maebe via fpc-pascal
On 10/03/2021 13:17, Yuriy Sydorov via fpc-pascal wrote: > On 10.03.2021 11:34, LacaK via fpc-pascal wrote: >> >> A.) I compile my (units) program/library with -CX -XX (set in Project >> Options) >> > > Just a small note: > > -CX -XX are not needed for the top-tier targets nowadays. The section

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Yuriy Sydorov via fpc-pascal
On 10.03.2021 11:34, LacaK via fpc-pascal wrote: A.) I compile my (units) program/library with -CX -XX (set in Project Options) Just a small note: -CX -XX are not needed for the top-tier targets nowadays. The section based smart linking is a default option in recent FPC versions. Yuriy.

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Sven Barth via fpc-pascal
LacaK via fpc-pascal schrieb am Mi., 10. März 2021, 10:34: > Hi, > > my goal is DO NOT include unused procedures, methods in final > program/library on Win32 target exe/dll. > > A.) I compile my (units) program/library with -CX -XX (set in Project > Options) > > B.) I did also experiments with

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Jonas Maebe via fpc-pascal
On 10/03/2021 10:34, LacaK via fpc-pascal wrote: > 1. I did not notice difference between A and B (it seems like WPO did > not reduce size of EXE (may be that I do something wrong)) > 1.1 is there way how I can check which procedures were striped out or > vice-versa included? You can generate