It will be nice have this in documentation. For example in
https://www.freepascal.org/docs-html/prog/progse30.html#x195-2000007.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 be some infos about behavior on various targets)
-Laco.
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
based smart linking is a default option in recent FPC versions.
At least -XX is still necessary, otherwise we don't enable dead
code/data stripping in the linker (at least not on Linux). And on macOS,
-CX is also needed, otherwise the compiler does not emit a directive in
the object files that dead code/data stripping should be enabled based
on whether or not there are references to the global symbols preceding them.
Neither parameter may be necessary on Windows, but that's probably the
only one.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal