[Lazarus] Can I configure Lazarus (or the project) to only add symbols on debug?

Bart bartjunk64 at gmail.com
Mon Dec 13 22:44:16 CET 2021


On Mon, Dec 13, 2021 at 10:29 PM Bo Berglund via lazarus
<lazarus at lists.lazarus-ide.org> wrote:


> This sounds like what I need.
> I looked at the project options and found that there is one box to enter the
> Execute after command. And checkboxes to set when it is used.
>
> But I would need *two* commands:
> - copy to the svn location
> - strip -s on that copy
>

In compiler options you can set various debugging related options as well.
One is to strip symbols.
- uncheck: "generate infor for the debugger"
- check: Strip symbols from executable
You apply those debugging options to your "Release" build mode.
You keep all relevant debugging options checked for your "Debug" build-mode.

Now you develop in "Debug" build-mode.
Once you're ready to release: swicth build-mode to "Release" and compile.

(You might want a "Release and copy to svn" build mode with the
"Execute after command", sou you can also test your release mode build
(if you use e.g. different optimizations, some yet unnoticed bug may
crop up.)



-- 
Bart


More information about the lazarus mailing list