Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable smart linking?

I requested a feature on Delphi's UserVoice, but I didn't understand Nick Hodges's answer.

  1. What version of Delphi supports smart linking?
  2. How do I enable this option?
like image 646
Ivan Prodanov Avatar asked Nov 29 '22 18:11

Ivan Prodanov


1 Answers

You seem to be worrying about SysUtils specifically. Here's what's going on:

Smart Linking will "smartlink out" everything that it can prove that the app never uses. Unfortunately, the criteria for proof are very high. If you use a unit and it has anything in the initialization section, any code used there is guaranteed to execute, so it will be dragged into your app, along with any classes used there, plus any classes that those classes use, etc...

In the case of SysUtils, that means the full exception handling package. You can't get rid of it without removing SysUtils from your app completely. Allen Bauer mentioned that they might use a new trick in a future release to reduce this, but for now you're stuck with it.

like image 160
Mason Wheeler Avatar answered Dec 06 '22 20:12

Mason Wheeler