[Lazarus] LCL recompilation

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 3 09:13:09 CET 2011


On Thu, 03 Feb 2011 06:38:44 +0100
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> The new handling of the LCL recompilation causes some trouble to me :-(
> 
> In former times it was possible to configure and compile the LCL in a 
> defined way. Now project specific settings can result in a recompilation 
> of the LCL, with every project, with chances that the recompilation 
> fails for a bunch of reasons. Even a "make clean all" can not help any 
> more, when testing a project forces another recompilation of the LCL :-(

The LCL is only recompiled if needed, that means:
If the project defines another target (widget/os/cpu) and the LCL was
not yet compiled for that target, the LCL will be recompiled.
Or if you change the compiler, e.g. you switch from 2.4.2 to 2.5.1.
Or if you change the source of the LCL.
Or if you change the IDEBuildOptions.

If you spot a recompile without need please report the bug.

 
> Is it possible to "fix" the LCL compilation (i.e. no implied rebuild)?

Since the LCL is a normal package, you can open it and set the
automatic rebuild to manually.
This setting is stored in the lpk.

 
> Is it possible to use the Lazarus.lpi project for testing changes to the 
> LCL or IDE interface? Since this project does *not* recompile the LCL, 
> how can the LCL be rebuilt for such testing, without recompilation of 
> the current IDE?

The lazarus.lpi has disabled compile in its compiler options. You can
compile via the Tools / Build Lazarus.
To test changes to the LCL/IDEIntf without recompiling the IDE, create
a project and add IDEIntf as requirement to the project.

 
> Is it possible to have different LCL versions, for the IDE and other 
> projects? Rebuilding the IDE, e.g. to add or remove packages, should be 
> possible without adding eventual modifications to the LCL. I'd like to 
> have a single stable IDE on my system, that is never affected by 
> exploring different SVN branches or other local changes to the codebase.

Use two different lazarus source directories and the --pcp switch.

 
> Is it possible to have different debug settings, for projects and the 
> LCL? 

The LCL is compiled separately from the project and uses its own
compiler settings. Therefore the debug and optimization settings of the
project are not applied to the LCL.


> Code navigation (goto declaration...) and stepping through LCL 
> code, down to the widgetset level, seems to require a debug version of 
> the LCL.

Code navigation ignores all debug settings. The debugger and stack
traces requires a debug version of the LCL.

Mattias




More information about the Lazarus mailing list