+ added new field 'define' to ttargetswitchinfo, which specifies a system macro

to be defined while the target switch is active
* the CLD target switch defines 'FPC_ENABLED_CLD' once again

git-svn-id: trunk@25594 -
This commit is contained in:
nickysn 2013-09-28 14:14:32 +00:00
parent 90fb63db26
commit ac66f3ae1b
2 changed files with 18 additions and 11 deletions

View File

@ -567,7 +567,8 @@ implementation
windirs,
{$endif VER2_4}
{$endif}
comphook;
comphook,
symtable;
{****************************************************************************
TLinkStrMap
@ -1443,6 +1444,11 @@ implementation
begin
if gotvalue then
result:=false;
if (TargetSwitchStr[opt].define<>'') and (doset xor (opt in a)) then
if doset then
def_system_macro(TargetSwitchStr[opt].define)
else
undef_system_macro(TargetSwitchStr[opt].define);
if doset then
include(a,opt)
else

View File

@ -298,6 +298,7 @@ interface
hasvalue: boolean;
{ target switch can be used only globally }
isglobal: boolean;
define: string[15];
end;
const
@ -316,16 +317,16 @@ interface
'DWARFSETS','STABSABSINCLUDES','DWARFMETHODCLASSPREFIX');
TargetSwitchStr : array[ttargetswitch] of ttargetswitchinfo = (
(name: ''; hasvalue: false; isglobal: true ),
(name: 'SMALLTOC'; hasvalue: false; isglobal: true ),
(name: 'COMPACTINTARRAYINIT'; hasvalue: false; isglobal: true ),
(name: 'ENUMFIELDINIT'; hasvalue: false; isglobal: true ),
(name: 'AUTOGETTERPREFIX'; hasvalue: true ; isglobal: false),
(name: 'AUTOSETTERPREFIX'; hasvalue: true ; isglobal: false),
(name: 'THUMBINTERWORKING'; hasvalue: false; isglobal: true ),
(name: 'LOWERCASEPROCSTART'; hasvalue: false; isglobal: true ),
(name: 'INITLOCALS'; hasvalue: false; isglobal: true ),
(name: 'CLD'; hasvalue: false; isglobal: true )
(name: ''; hasvalue: false; isglobal: true ; define: ''),
(name: 'SMALLTOC'; hasvalue: false; isglobal: true ; define: ''),
(name: 'COMPACTINTARRAYINIT'; hasvalue: false; isglobal: true ; define: ''),
(name: 'ENUMFIELDINIT'; hasvalue: false; isglobal: true ; define: ''),
(name: 'AUTOGETTERPREFIX'; hasvalue: true ; isglobal: false; define: ''),
(name: 'AUTOSETTERPREFIX'; hasvalue: true ; isglobal: false; define: ''),
(name: 'THUMBINTERWORKING'; hasvalue: false; isglobal: true ; define: ''),
(name: 'LOWERCASEPROCSTART'; hasvalue: false; isglobal: true ; define: ''),
(name: 'INITLOCALS'; hasvalue: false; isglobal: true ; define: ''),
(name: 'CLD'; hasvalue: false; isglobal: true ; define: 'FPC_ENABLED_CLD')
);
{ switches being applied to all CPUs at the given level }