#1 2012-12-05 10:45:45

h.hasenack
Member
From: Nijmegen, Netherlands
Registered: 2012-08-01
Posts: 173
Website

RTTI foot print reduction

Hi Ab

I am using class attributes to document my unit tests, and this works exceptionally fine. Except for the unit tests generated with {$I synopse.inc} in the dpr file. It took me several hours to find out why the same unit did have attributes in one exe and not in another.

It turned out that in synopse.inc you set {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} to reduce rtti footprint for 2010/XE/XE2/XE3 code generation.

    {$if CompilerVersion >= 21.0}
      // Delphi 2010/XE: Reduce EXE size by disabling much RTTI
      {$define ISDELPHI2010}
      {$WEAKLINKRTTI ON}
      {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 
    {$ifend}

Though this is not a bad idea by itself, it is not required for Mormot compilation IMO. I would suggest leaving the compiler directive out by default and rely on the applications default settings.

Regards - Hans

Offline

#2 2012-12-05 14:16:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: RTTI foot print reduction

Feel free to customize your own Synopse.inc local copy.
This is the purpose of this include file.

It normally change only when a new compiler is added.

Offline

#3 2012-12-05 15:31:21

h.hasenack
Member
From: Nijmegen, Netherlands
Registered: 2012-08-01
Posts: 173
Website

Re: RTTI foot print reduction

I understand, and adjusting it is exactly what I did.

What I meant is that changing this setting does not affect the way mormot works, it only as an effect on the output file size. My suggestion was to completely leave out the setting as it is no requirement for mormot to compile/run.

Hans

Offline

Board footer

Powered by FluxBB