[fpc-pascal] LLVM LTO
Jonas Maebe
jonas at freepascal.org
Fri Aug 11 12:46:39 CEST 2023
On 10/08/2023 17:06, Benito van der Zander via fpc-pascal wrote:
> I tried to use the LLVM Link-Time-Optimization, -Clflto
I should update the wiki page. Under Debian 11, I can tell FPC to use
gold with lto by specifying the following command line parameters:
-Clflto -Clflto-no-system -k-fuse-ld=gold -k-plugin=/path/to/LLVMgold.so
Note that compiling the FPC RTL with LTO currently doesn't work under
Linux, because LLVM does not rename local labels in pure assembler
procedures when doing so, resulting in duplicate labels.
It works fine when compiling FPC and its units normally, and then only
using LTO for your program.
Jonas
More information about the fpc-pascal
mailing list