<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi <br>
<br>
<blockquote type="cite"> -Clflto -Clflto-no-system -k-fuse-ld=gold
-k-plugin=/path/to/LLVMgold.so
</blockquote>
<br>
that helped, but I have to do it without -Clflto-no-system, or it
gives an error</div>
<div><br>
</div>
<div>Then I could run my unit tests:<br>
</div>
<div><br>
</div>
<div>FPC alone: 25 seconds</div>
<div>LLVM: 21 seconds</div>
<div>LLVM LTO: 20 seconds</div>
<div><br>
</div>
<div>does not seem to matter much<br>
</div>
<div><br>
</div>
<div>Cheers,<br>
Benito <br>
</div>
<div class="moz-cite-prefix">On 11.08.23 12:46, Jonas Maebe via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:4155f41e-0d83-b884-1c6b-cddee0cab3a1@freepascal.org">On
10/08/2023 17:06, Benito van der Zander via fpc-pascal wrote:
<br>
<blockquote type="cite">I tried to use the LLVM
Link-Time-Optimization, -Clflto
<br>
</blockquote>
<br>
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
<br>
<br>
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.
<br>
<br>
It works fine when compiling FPC and its units normally, and then
only using LTO for your program.
<br>
<br>
<br>
Jonas
<br>
_______________________________________________
<br>
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
<br>
</blockquote>
</body>
</html>