Re: [Lazarus] Strip debug info

2012-05-02 Thread Michael Schnell

On 05/01/2012 12:54 AM, Bernd wrote:

There are build modes.
In fact I do understand that I can create build mode variables (macros) 
that can be checked with {$if in the source code, but I don't know how 
to use those to select different compile options (such as smart linking, 
optimizing or debug info creation).


-Michael


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-05-02 Thread Žilvinas Ledas


On 2012-05-02 11:31, Michael Schnell wrote:

On 05/01/2012 12:54 AM, Bernd wrote:

There are build modes.
In fact I do understand that I can create build mode variables 
(macros) that can be checked with {$if in the source code, but I 
don't know how to use those to select different compile options (such 
as smart linking, optimizing or debug info creation).


-Michael


Build modes are not macros.
You can read here to know more about build modes: 
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Build_modes



Regards,
Žilvinas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Sven Barth
Am 30.04.2012 07:30 schrieb Richard Mace rich...@shrinkyourbills.co.uk:


 On 30 April 2012 04:49, Alexander Klenin kle...@gmail.com wrote:

 While I am personally ambivalent about the default state of -Xg switch,
 I'd like to point out another use case where it matters:
 compiling on Windows on slow machine with antivirus installed.

 When I tried to persuade my students to switch to Lazarus from Delphi,
 I've got many complaints about Lazarus being too slow.
 About a third of these complaints were fixed by either excluding
 Lazarus directory from AV's monitoring list, or turning -Xg on.



 Sorry, I might have missed this, but what would be the main disadvantage
for a newbie of having the -Xg switch on at default.
 I don't really understand about the difference between having the debug
info internal to the .exe or external, and I am guessing that the majority
of people coming to Lazarus won't either. I just think the more people will
be complaining about the default size of the .exe as apposed to having the
debug info stored externally, unless I am really missing the point (quite
possibly).

The main disadvantage is that -Xg is rather untested (especially
considering the things that Martin wrote about the IDE) so in the end it
might be less newb friendly than the debug info included in the
executable (co.Audrey questions like why can't I debug anymore?).

Also AFAIK FPC's lineinfo units (for both Stabs and Dwarf) don't work with
external debug info (I don't remember exactly so this needs to be tested).

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Hans-Peter Diettrich

Alexander Klenin schrieb:

While I am personally ambivalent about the default state of -Xg switch,
I'd like to point out another use case where it matters:
compiling on Windows on slow machine with antivirus installed.

When I tried to persuade my students to switch to Lazarus from Delphi,
I've got many complaints about Lazarus being too slow.
About a third of these complaints were fixed by either excluding
Lazarus directory from AV's monitoring list, or turning -Xg on.


AV software tends to affect Delphi and its compiled projects, too. It's 
not a good idea to use AV software on a Windows development machine.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Alexander Klenin
On Mon, Apr 30, 2012 at 16:56, Hans-Peter Diettrich
drdiettri...@aol.com wrote:
 AV software tends to affect Delphi and its compiled projects, too.
Yes, but in recent years Delphi was included in safe lists of most
AV products.

 It's not a good idea to use AV software on a Windows development machine.
It is also not a good idea to use Windows on a development machine :)
However, we live in imperfect world.

-- 
Alexander S. Klenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Michael Schnell

On 04/29/2012 12:09 PM, Martin wrote:

 Then you have an outdated debug info file,
The release build could just delete this file (provided it's there 
where a corresponding  debug build would create it).


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Michael Schnell

On 04/30/2012 05:49 AM, Alexander Klenin wrote:

When I tried to persuade my students to switch to Lazarus from Delphi,
I've got many complaints about Lazarus being too slow.
About a third of these complaints were fixed by either excluding
Lazarus directory from AV's monitoring list, or turning -Xg on.
Dud you not try to persuade them to use Linux (where Viruses are no big 
problem) . :-)


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Andreas Schneider
On Monday, April 30, 2012 09:37 Michael Schnell wrote:
 On 04/29/2012 12:09 PM, Martin wrote:
  Then you have an outdated debug info file,
 The release build could just delete this file (provided it's there 
 where a corresponding  debug build would create it).

 -Michael


Please  don't  oversimplify  a  release  build.  At  least  one  other
difference  is  smart  linking.  You  shouldn't  smart  link for debug
purposes,  but it would be a good idea to smart link for release. Also
optimizations  should  be turned of for debug while they should (or at
least could) be enabled for release.

It  helps  to  have  several  checks (overflow, range, etc.) on during
debug too, but not for release.

It is (or should) not simply (be) a matter of debug info.

In  that  light  I find the big exe even good as it gets users to find
out  why  and  think about debug/release builds. If they simply ship a
debug  exe  (without  actual  debug  info) they might still find bad
things  like  slow  performance  etc, which might be caused by enabled
checks and/or missing optimizations.

I  think  you  have  to  understand the full package to properly build
release  ready  software.  And  a  far too huge size might be the best
indicator that something isn't right yet :-)

-- 
Best Regards,
Andreas

pgpHENAoV3vac.pgp
Description: PGP signature
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Richard Mace
 Well, the problem is the size of the exe file. ;-)

  When I am working on a project I usually want to generate debug
  information for debugging.
  But when I give the generated file to someone else I surely do not need
  this information in the exe file anymore.
  So why should I be forced to search for ways to delete this information
  from the exe if there could be a way to avoid this hassle?

 There is no need to search for ways to delete this information, you need
 only a proper workflow: exes compiled for distribution shall be compiled
 with release settings which means:
 - no debug info
 - symbols fully stripped
 - full optimization (which would make debugging harder)
 - asserts ignored
 - custom debug code ignored
 - ...
 Using debug and release settings is something very basic when working on
 software being deployed to others.


This is interesting, I'd had never actually thought of a work flow like
this. So, would you have 2x different projects? 1 with as dubug and the 2nd
as release, or is there a better way of doing it?

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-30 Thread Bernd
2012/4/30 Richard Mace rich...@shrinkyourbills.co.uk:

 This is interesting, I'd had never actually thought of a work flow like
 this. So, would you have 2x different projects? 1 with as dubug and the 2nd
 as release, or is there a better way of doing it?

There are build modes. There is a page in the project options dialog
where you can set up different build modes and each can have different
settings. There is also a toolbar button in  the IDE main window to
change the currently active build mode. The UI to configure the build
modes is not yet as intuitive as it could ideally be but it works.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Jürgen Hestermann



Richard Mace schrieb:


... you can either not generated debug info at all or generate
external debug info (.dbg)...


Is there any reason why the -Xg flag is not on at default? What's the 
disadvantage of using this flag? The reason I say is because there is 
a massive reduction in .exe size?



Yes, that's what I wondered about too.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Florian Klämpfl
Am 28.04.2012 21:19, schrieb Richard Mace:
 
 
 On 28 April 2012 08:21, Reinier Olislagers reinierolislag...@gmail.com
 mailto:reinierolislag...@gmail.com wrote:
 
 On 28-4-2012 8:57, Richard Mace wrote:
  Hi,
  What's the safest way of making the .exe smaller than default? Is it
  just to strip debug info?
  How would I do this?
 Perhaps this will give you some ideas?
 
 http://wiki.lazarus.freepascal.org/Size_Matters#Incorrect_compiler_configuration
 
 ... you can either not generated debug info at all or generate external
 debug info (.dbg)...
 
 
 Is there any reason why the -Xg flag is not on at default? What's the
 disadvantage of using this flag? The reason I say is because there is a
 massive reduction in .exe size?

What's the problem with the .exe size when compiling with debug info? If
one compiles with debug settings, one usually wants to have the debug
info? If not, don't use debug settings.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Jürgen Hestermann

Florian Klämpfl schrieb:
 What's the problem with the .exe size when compiling with debug info? If
 one compiles with debug settings, one usually wants to have the debug
 info? If not, don't use debug settings.

Well, the problem is the size of the exe file. ;-)
When I am working on a project I usually want to generate debug 
information for debugging.
But when I give the generated file to someone else I surely do not need 
this information in the exe file anymore.
So why should I be forced to search for ways to delete this information 
from the exe if there could be a way to avoid this hassle?



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Florian Klämpfl
Am 29.04.2012 11:12, schrieb Jürgen Hestermann:
 Florian Klämpfl schrieb:
 What's the problem with the .exe size when compiling with debug info? If
 one compiles with debug settings, one usually wants to have the debug
 info? If not, don't use debug settings.
 
 Well, the problem is the size of the exe file. ;-)
 When I am working on a project I usually want to generate debug
 information for debugging.
 But when I give the generated file to someone else I surely do not need
 this information in the exe file anymore.
 So why should I be forced to search for ways to delete this information
 from the exe if there could be a way to avoid this hassle?

There is no need to search for ways to delete this information, you need
only a proper workflow: exes compiled for distribution shall be compiled
with release settings which means:
- no debug info
- symbols fully stripped
- full optimization (which would make debugging harder)
- asserts ignored
- custom debug code ignored
- ...
Using debug and release settings is something very basic when working on
software being deployed to others.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Graeme Geldenhuys
On 29 April 2012 11:21, Florian Klämpfl flor...@freepascal.org wrote:
 Using debug and release settings is something very basic when working on
 software being deployed to others.

I fully agree. MSEide has project setting groups where you can define
debug and release settings. Lazarus IDE I believe now has such
functionality too in Trunk. This is even possible from the command
line using something like:

   fpc @debug.cfg myproject.pas
   fpc @release.cfg myproject.pas

The 'debug.cfg' and 'release.cfg' are simply text files with compiler
settings (one per line).


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Martin

On 29/04/2012 09:56, Jürgen Hestermann wrote:


Richard Mace schrieb:


... you can either not generated debug info at all or generate
external debug info (.dbg)...


Is there any reason why the -Xg flag is not on at default? What's the 
disadvantage of using this flag? The reason I say is because there is 
a massive reduction in .exe size?



Yes, that's what I wondered about too.


Probably it is simple less tested, and therefore it is unknown if in 
works in all situations.


Also, I guess it is more error prone. Compile with external debug, then 
make changes, recompile but with release settings. Then you have an 
outdated debug info file, and if you happen to run that in the debugger, 
you get a lot of strange things


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Martin

On 29/04/2012 10:12, Jürgen Hestermann wrote:

Florian Klämpfl schrieb:
 What's the problem with the .exe size when compiling with debug 
info? If

 one compiles with debug settings, one usually wants to have the debug
 info? If not, don't use debug settings.

Well, the problem is the size of the exe file. ;-)
When I am working on a project I usually want to generate debug 
information for debugging.
But when I give the generated file to someone else I surely do not 
need this information in the exe file anymore.
So why should I be forced to search for ways to delete this 
information from the exe if there could be a way to avoid this hassle?




Well, most people need 2 build profiles anyway.

For when I debug I have -Crio -O1, heap trc and other flags.
On release I have -O2, and no -C, no heaptrc...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Hans-Peter Diettrich

Martin schrieb:

On 29/04/2012 09:56, Jürgen Hestermann wrote:


Also, I guess it is more error prone. Compile with external debug, then 
make changes, recompile but with release settings. Then you have an 
outdated debug info file, and if you happen to run that in the debugger, 
you get a lot of strange things


Give the executable different names. When debugging, the exe name is 
irrelevant since the application will be started by F9.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Martin

On 29/04/2012 13:00, Hans-Peter Diettrich wrote:

Martin schrieb:

On 29/04/2012 09:56, Jürgen Hestermann wrote:


Also, I guess it is more error prone. Compile with external debug, 
then make changes, recompile but with release settings. Then you have 
an outdated debug info file, and if you happen to run that in the 
debugger, you get a lot of strange things


Give the executable different names. When debugging, the exe name is 
irrelevant since the application will be started by F9.


Then you can always generate 2 exe too. One with and one without dbg info...
If you generate, the 2 exe individually, people may debug their latest 
changes, and then ship the release exe, from the day before


I am not saying, that external debug info could not be made default. And 
neither do I say, that the current solution has no problems (it 
obviously has)


In fact I think it would be great if it could be changed to use external 
dbg info (assuming it is done right).


Just pointing out, it is probably not as easy, as just a new default for 
that checkbox.
- Test it on various platforms, cross compile, remote debug,  
(ideally add to the debugger test suit)
- Test it for projects with starter/host application (debug libraries 
with external info)

- different gdb versions (at least 7.0 to 7.4 / 6.3.50 on Mac)
- implement checks in the IDE so no old file will be used accidental 
(different name; or remove/rename old dbg info file)


Maybe other things I haven't thought of.

In any case, while nice to have, it is nothing I am going to bother 
about. There is plenty other, that I find more important.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Jürgen Hestermann

Martin schrieb:
 Is there any reason why the -Xg flag is not on at default? What's 
the disadvantage of using this flag? The reason I say is because there 
is a massive reduction in .exe size?


 Yes, that's what I wondered about too.

 Also, I guess it is more error prone. Compile with external debug, 
then make changes,
 recompile but with release settings. Then you have an outdated debug 
info file, and
 if you happen to run that in the debugger, you get a lot of strange 
things



Realy? If you compile without (external) debug info can you still run 
the debugger from the IDE?

If yes, this has to be disabled of course.
If not, then there is no danger that an outdated debug info file can be 
used.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Martin

On 29/04/2012 16:54, Jürgen Hestermann wrote:

Martin schrieb:
 Is there any reason why the -Xg flag is not on at default? What's 
the disadvantage of using this flag? The reason I say is because there 
is a massive reduction in .exe size?


 Yes, that's what I wondered about too.

 Also, I guess it is more error prone. Compile with external debug, 
then make changes,
 recompile but with release settings. Then you have an outdated debug 
info file, and
 if you happen to run that in the debugger, you get a lot of strange 
things



Realy? If you compile without (external) debug info can you still run 
the debugger from the IDE?

If yes, this has to be disabled of course.
If not, then there is no danger that an outdated debug info file can 
be used.


Again, not that simple.

Currently, I can start the app (without debug info) by pressing F9. Just 
as a way to run it. Not to debug it.
So if that was no longer possible, then alternate means need to be 
created, to just run (there is a feature request for that already)



But *IF* such a check would be added.
the appropriate way for the IDE to check is not to see, if the last 
compile did have dbg info. It is to check, if the debug info is available.


Example: I often use the Run Param  Host App to debug a different 
version of the executable. It works perfect. Of course that still works, 
even if the last compiled exe has no debug info.


And one can also compile the project outside the IDE, and debug it in 
the IDE .


And, of course that makes it even more complicated: because if I debug a 
dll, I might have a project loaded that does uses the dll. I would have 
to test, if the debugger can use the dll's debug info, if the host app 
has no debug info (I do not know)


---
Again, yes the situation can (and need/should) be improved.
But again: not that simple.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Alexander Klenin
While I am personally ambivalent about the default state of -Xg switch,
I'd like to point out another use case where it matters:
compiling on Windows on slow machine with antivirus installed.

When I tried to persuade my students to switch to Lazarus from Delphi,
I've got many complaints about Lazarus being too slow.
About a third of these complaints were fixed by either excluding
Lazarus directory from AV's monitoring list, or turning -Xg on.

-- 
Alexander S. Klenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-29 Thread Richard Mace
On 30 April 2012 04:49, Alexander Klenin kle...@gmail.com wrote:

 While I am personally ambivalent about the default state of -Xg switch,
 I'd like to point out another use case where it matters:
 compiling on Windows on slow machine with antivirus installed.

 When I tried to persuade my students to switch to Lazarus from Delphi,
 I've got many complaints about Lazarus being too slow.
 About a third of these complaints were fixed by either excluding
 Lazarus directory from AV's monitoring list, or turning -Xg on.



Sorry, I might have missed this, but what would be the main disadvantage
for a newbie of having the -Xg switch on at default.
I don't really understand about the difference between having the debug
info internal to the .exe or external, and I am guessing that the majority
of people coming to Lazarus won't either. I just think the more people will
be complaining about the default size of the .exe as apposed to having the
debug info stored externally, unless I am really missing the point (quite
possibly).

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread Reinier Olislagers
On 28-4-2012 8:57, Richard Mace wrote:
 Hi,
 What's the safest way of making the .exe smaller than default? Is it
 just to strip debug info?
 How would I do this?
Perhaps this will give you some ideas?
http://wiki.lazarus.freepascal.org/Size_Matters#Incorrect_compiler_configuration

... you can either not generated debug info at all or generate external
debug info (.dbg)...

Regards,
Reinier


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread Richard Mace
On 28 April 2012 08:21, Reinier Olislagers reinierolislag...@gmail.comwrote:

 On 28-4-2012 8:57, Richard Mace wrote:
  Hi,
  What's the safest way of making the .exe smaller than default? Is it
  just to strip debug info?
  How would I do this?
 Perhaps this will give you some ideas?

 http://wiki.lazarus.freepascal.org/Size_Matters#Incorrect_compiler_configuration

 ... you can either not generated debug info at all or generate external
 debug info (.dbg)...

 Regards,
 Reinier


Thanks, I'll try with the -Xg switch

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread John Landmesser

On 28.04.2012 08:57, Richard Mace wrote:

Hi,
What's the safest way of making the .exe smaller than default? Is it 
just to strip debug info?

How would I do this?

Thanks in advance

Richard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



my DAU method is in terminal on linux

strip --strip-all ./MyApplication
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread John Landmesser

On 28.04.2012 08:57, Richard Mace wrote:

Hi,
What's the safest way of making the .exe smaller than default? Is it 
just to strip debug info?

How would I do this?

Thanks in advance

Richard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



my DAU method is in terminal on linux

strip --strip-all ./MyApplication

strip.exe for Win is part of your fpc bin directory:

/lazarus/fpc/2.5.1/bin/i386-win32/strip.exe

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread Richard Mace
On 28 April 2012 11:03, John Landmesser joh...@online.de wrote:

  On 28.04.2012 08:57, Richard Mace wrote:

 Hi,
 What's the safest way of making the .exe smaller than default? Is it just
 to strip debug info?
 How would I do this?

  Thanks in advance

  Richard


 --
 ___
 Lazarus mailing 
 listLazarus@lists.lazarus.freepascal.orghttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 my DAU method is in terminal on linux

 strip --strip-all ./MyApplication

 strip.exe for Win is part of your fpc bin directory:

 /lazarus/fpc/2.5.1/bin/i386-win32/strip.exe


Would this be instead of the -Xg switch or as well as? Or does it do the
same thing?

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strip debug info

2012-04-28 Thread Richard Mace
On 28 April 2012 08:21, Reinier Olislagers reinierolislag...@gmail.comwrote:

 On 28-4-2012 8:57, Richard Mace wrote:
  Hi,
  What's the safest way of making the .exe smaller than default? Is it
  just to strip debug info?
  How would I do this?
 Perhaps this will give you some ideas?

 http://wiki.lazarus.freepascal.org/Size_Matters#Incorrect_compiler_configuration

 ... you can either not generated debug info at all or generate external
 debug info (.dbg)...


Is there any reason why the -Xg flag is not on at default? What's the
disadvantage of using this flag? The reason I say is because there is a
massive reduction in .exe size?

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus