|
@@ -532,7 +532,6 @@ interface
|
|
function UpdateOptimizerStr(s:string;var a:toptimizerswitches):boolean;
|
|
function UpdateOptimizerStr(s:string;var a:toptimizerswitches):boolean;
|
|
function UpdateWpoStr(s: string; var a: twpoptimizerswitches): boolean;
|
|
function UpdateWpoStr(s: string; var a: twpoptimizerswitches): boolean;
|
|
function UpdateDebugStr(s:string;var a:tdebugswitches):boolean;
|
|
function UpdateDebugStr(s:string;var a:tdebugswitches):boolean;
|
|
- function UpdateTargetSwitchStr(s: string; var a: ttargetswitches; global: boolean): boolean;
|
|
|
|
function IncludeFeature(const s : string) : boolean;
|
|
function IncludeFeature(const s : string) : boolean;
|
|
function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
|
|
function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
|
|
|
|
|
|
@@ -567,8 +566,7 @@ implementation
|
|
windirs,
|
|
windirs,
|
|
{$endif VER2_4}
|
|
{$endif VER2_4}
|
|
{$endif}
|
|
{$endif}
|
|
- comphook,
|
|
|
|
- symtable;
|
|
|
|
|
|
+ comphook;
|
|
|
|
|
|
{****************************************************************************
|
|
{****************************************************************************
|
|
TLinkStrMap
|
|
TLinkStrMap
|
|
@@ -1392,95 +1390,6 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- function UpdateTargetSwitchStr(s: string; var a: ttargetswitches; global: boolean): boolean;
|
|
|
|
- var
|
|
|
|
- tok,
|
|
|
|
- value : string;
|
|
|
|
- setstr: string[2];
|
|
|
|
- equalspos: longint;
|
|
|
|
- doset,
|
|
|
|
- gotvalue,
|
|
|
|
- found : boolean;
|
|
|
|
- opt : ttargetswitch;
|
|
|
|
- begin
|
|
|
|
- result:=true;
|
|
|
|
- repeat
|
|
|
|
- tok:=GetToken(s,',');
|
|
|
|
- if tok='' then
|
|
|
|
- break;
|
|
|
|
- setstr:=upper(copy(tok,length(tok),1));
|
|
|
|
- if setstr='-' then
|
|
|
|
- begin
|
|
|
|
- setlength(tok,length(tok)-1);
|
|
|
|
- doset:=false;
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- doset:=true;
|
|
|
|
- { value specified? }
|
|
|
|
- gotvalue:=false;
|
|
|
|
- equalspos:=pos('=',tok);
|
|
|
|
- if equalspos<>0 then
|
|
|
|
- begin
|
|
|
|
- value:=copy(tok,equalspos+1,length(tok));
|
|
|
|
- delete(tok,equalspos,length(tok));
|
|
|
|
- gotvalue:=true;
|
|
|
|
- end;
|
|
|
|
- found:=false;
|
|
|
|
- uppervar(tok);
|
|
|
|
- for opt:=low(ttargetswitch) to high(ttargetswitch) do
|
|
|
|
- begin
|
|
|
|
- if TargetSwitchStr[opt].name=tok then
|
|
|
|
- begin
|
|
|
|
- found:=true;
|
|
|
|
- break;
|
|
|
|
- end;
|
|
|
|
- end;
|
|
|
|
- if found then
|
|
|
|
- begin
|
|
|
|
- if not global and
|
|
|
|
- TargetSwitchStr[opt].isglobal then
|
|
|
|
- result:=false
|
|
|
|
- else if not TargetSwitchStr[opt].hasvalue then
|
|
|
|
- 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
|
|
|
|
- exclude(a,opt)
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- begin
|
|
|
|
- if not gotvalue or
|
|
|
|
- not doset then
|
|
|
|
- result:=false
|
|
|
|
- else
|
|
|
|
- begin
|
|
|
|
- case opt of
|
|
|
|
- ts_auto_getter_prefix:
|
|
|
|
- prop_auto_getter_prefix:=value;
|
|
|
|
- ts_auto_setter_predix:
|
|
|
|
- prop_auto_setter_prefix:=value;
|
|
|
|
- else
|
|
|
|
- begin
|
|
|
|
- writeln('Internalerror 2012053001');
|
|
|
|
- halt(1);
|
|
|
|
- end;
|
|
|
|
- end;
|
|
|
|
- end;
|
|
|
|
- end;
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- result:=false;
|
|
|
|
- until false;
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
function IncludeFeature(const s : string) : boolean;
|
|
function IncludeFeature(const s : string) : boolean;
|
|
var
|
|
var
|
|
i : tfeature;
|
|
i : tfeature;
|