+ support the $fpcmemorymodel macro in fpc.cfg

git-svn-id: trunk@29315 -
This commit is contained in:
nickysn 2014-12-23 18:55:57 +00:00
parent dde2207866
commit b193073e32
2 changed files with 13 additions and 0 deletions

View File

@ -836,6 +836,11 @@ implementation
Replace(s,'$FPCTARGET',target_full_string);
Replace(s,'$SUBARCH',lower(cputypestr[init_settings.cputype]));
Replace(s,'$FPCABI',lower(abiinfo[target_info.abi].name));
{$ifdef i8086}
Replace(s,'$FPCMEMORYMODEL',lower(x86memorymodelstr[init_settings.x86memorymodel]));
{$else i8086}
Replace(s,'$FPCMEMORYMODEL','flat');
{$endif i8086}
{$ifdef mswindows}
ReplaceSpecialFolder('$LOCAL_APPDATA',CSIDL_LOCAL_APPDATA);
ReplaceSpecialFolder('$APPDATA',CSIDL_APPDATA);

View File

@ -705,6 +705,14 @@ interface
type
tx86memorymodel = (mm_tiny,mm_small,mm_medium,mm_compact,mm_large,mm_huge);
const
x86memorymodelstr : array[tx86memorymodel] of string[7]=(
'TINY',
'SMALL',
'MEDIUM',
'COMPACT',
'LARGE',
'HUGE');
{ hide Sysutils.ExecuteProcess in units using this one after SysUtils}
const