mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-22 17:29:46 +02:00
Use NO prefix to disable a feature (-Sfnoheap) instead of '-' prefix
git-svn-id: trunk@34018 -
This commit is contained in:
parent
270a574d6a
commit
13076a3580
@ -555,7 +555,7 @@ interface
|
|||||||
function Setcputype(const s:string;var a:tsettings):boolean;
|
function Setcputype(const s:string;var a:tsettings):boolean;
|
||||||
function SetFpuType(const s:string;var a:tfputype):boolean;
|
function SetFpuType(const s:string;var a:tfputype):boolean;
|
||||||
function SetControllerType(const s:string;var a:tcontrollertype):boolean;
|
function SetControllerType(const s:string;var a:tcontrollertype):boolean;
|
||||||
function IncludeFeature(const s : string) : boolean;
|
function HandleFeature(const s : string) : boolean;
|
||||||
function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
|
function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
|
||||||
|
|
||||||
{# Routine to get the required alignment for size of data, which will
|
{# Routine to get the required alignment for size of data, which will
|
||||||
@ -1232,7 +1232,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function IncludeFeature(const s : string) : boolean;
|
function HandleFeature(const s : string) : boolean;
|
||||||
var
|
var
|
||||||
i : tfeature;
|
i : tfeature;
|
||||||
begin
|
begin
|
||||||
@ -1243,6 +1243,14 @@ implementation
|
|||||||
include(features,i);
|
include(features,i);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
{ Also support -Sfnoheap to exclude heap }
|
||||||
|
if Copy(S,1,2)='NO' then
|
||||||
|
for i:=low(tfeature) to high(tfeature) do
|
||||||
|
if s='NO'+featurestr[i] then
|
||||||
|
begin
|
||||||
|
exclude(features,i);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
result:=false;
|
result:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1953,19 +1953,13 @@ begin
|
|||||||
if more[j]='-' then
|
if more[j]='-' then
|
||||||
begin
|
begin
|
||||||
if length(more)>j then
|
if length(more)>j then
|
||||||
begin
|
IllegalPara(opt)
|
||||||
inc(j);
|
|
||||||
if (ExcludeFeature(upper(copy(more,j,length(more)-j+1)))) then
|
|
||||||
j:=length(more)
|
|
||||||
else
|
|
||||||
IllegalPara(opt);
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
features:=[];
|
features:=[];
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if (IncludeFeature(upper(copy(more,j,length(more)-j+1)))) then
|
if (HandleFeature(upper(copy(more,j,length(more)-j+1)))) then
|
||||||
j:=length(more)
|
j:=length(more)
|
||||||
else
|
else
|
||||||
IllegalPara(opt);
|
IllegalPara(opt);
|
||||||
|
Loading…
Reference in New Issue
Block a user