[fpc-pascal] LLVM LTO
Benito van der Zander
benito at benibela.de
Tue Aug 15 17:24:56 CEST 2023
Hi
> -Clflto -Clflto-no-system -k-fuse-ld=gold -k-plugin=/path/to/LLVMgold.so
that helped, but I have to do it without -Clflto-no-system, or it gives
an error
Then I could run my unit tests:
FPC alone: 25 seconds
LLVM: 21 seconds
LLVM LTO: 20 seconds
does not seem to matter much
Cheers,
Benito
On 11.08.23 12:46, Jonas Maebe via fpc-pascal wrote:
> 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
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230815/8dd58487/attachment.htm>
More information about the fpc-pascal
mailing list