mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:29:17 +02:00
+ {$targetswitch xxx} directive that enables changing target switches
(-CTxxx) in the source code git-svn-id: trunk@23563 -
This commit is contained in:
parent
4022c29500
commit
a51e64bd4d
@ -1154,6 +1154,24 @@ unit scandir;
|
|||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
procedure dir_targetswitch;
|
||||||
|
var
|
||||||
|
name, value: string;
|
||||||
|
begin
|
||||||
|
{ note: *not* recorded in the tokenstream, so not replayed for generics }
|
||||||
|
current_scanner.skipspace;
|
||||||
|
name:=current_scanner.readid;
|
||||||
|
if c='=' then
|
||||||
|
begin
|
||||||
|
current_scanner.readchar;
|
||||||
|
current_scanner.readid;
|
||||||
|
value:=orgpattern;
|
||||||
|
UpdateTargetSwitchStr(name+'='+value,current_settings.targetswitches,current_module.in_global);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
UpdateTargetSwitchStr(name,current_settings.targetswitches,current_module.in_global);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure dir_typedaddress;
|
procedure dir_typedaddress;
|
||||||
begin
|
begin
|
||||||
do_delphiswitch('T');
|
do_delphiswitch('T');
|
||||||
@ -1591,6 +1609,7 @@ unit scandir;
|
|||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
AddDirective('SYSCALL',directive_all, @dir_syscall);
|
AddDirective('SYSCALL',directive_all, @dir_syscall);
|
||||||
{$endif powerpc}
|
{$endif powerpc}
|
||||||
|
AddDirective('TARGETSWITCH',directive_all, @dir_targetswitch);
|
||||||
AddDirective('THREADNAME',directive_all, @dir_threadname);
|
AddDirective('THREADNAME',directive_all, @dir_threadname);
|
||||||
AddDirective('TYPEDADDRESS',directive_all, @dir_typedaddress);
|
AddDirective('TYPEDADDRESS',directive_all, @dir_typedaddress);
|
||||||
AddDirective('TYPEINFO',directive_all, @dir_typeinfo);
|
AddDirective('TYPEINFO',directive_all, @dir_typeinfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user