IDE: uncomment the compiler options that were commented out earlier.

git-svn-id: trunk@42175 -
This commit is contained in:
juha 2013-07-22 20:38:25 +00:00
parent a99023497d
commit 5d273402b3
2 changed files with 39 additions and 38 deletions

View File

@ -158,9 +158,9 @@ type
procedure SetUseHeaptrc(const AValue: Boolean);
procedure SetUseLineInfoUnit(const AValue: Boolean);
procedure SetUseValgrind(const AValue: Boolean);
//procedure SetUncertainOpt(const AValue: Boolean);
//procedure SetVarsInReg(const AValue: Boolean);
//procedure SetSmallerCode(const AValue: boolean);
procedure SetUncertainOpt(const AValue: Boolean);
procedure SetVarsInReg(const AValue: Boolean);
procedure SetSmallerCode(const AValue: boolean);
procedure SetVerifyObjMethodCall(const AValue: boolean);
procedure SetWin32GraphicApp(const AValue: boolean);
procedure SetWriteFPCLogo(const AValue: Boolean);
@ -205,9 +205,9 @@ type
fTargetCPU: string;
fTargetProc: string;
fOptLevel: Integer;
//fVarsInReg: Boolean;
//fUncertainOpt: Boolean;
//FSmallerCode: boolean;
fVarsInReg: Boolean;
fUncertainOpt: Boolean;
FSmallerCode: boolean;
// Linking:
fGenDebugInfo: Boolean;
@ -364,9 +364,9 @@ type
property TargetCPU: string read fTargetCPU write SetTargetCPU; // general type
property TargetProcessor: String read fTargetProc write SetTargetProc; // specific
property OptimizationLevel: Integer read fOptLevel write SetOptLevel;
//property VariablesInRegisters: Boolean read fVarsInReg write SetVarsInReg;
//property UncertainOptimizations: Boolean read fUncertainOpt write SetUncertainOpt;
//property SmallerCode: boolean read FSmallerCode write SetSmallerCode;
property VariablesInRegisters: Boolean read fVarsInReg write SetVarsInReg;
property UncertainOptimizations: Boolean read fUncertainOpt write SetUncertainOpt;
property SmallerCode: boolean read FSmallerCode write SetSmallerCode;
// linking:
property GenerateDebugInfo: Boolean read fGenDebugInfo write SetGenDebugInfo;
@ -596,14 +596,14 @@ begin
fShowWarn:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetSmallerCode(const AValue: boolean);
begin
if FSmallerCode=AValue then exit;
FSmallerCode:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetSmartLinkUnit(const AValue: Boolean);
begin
if fSmartLinkUnit=AValue then exit;
@ -798,14 +798,14 @@ begin
FTargetFilenameAppplyConventions:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetUncertainOpt(const AValue: Boolean);
begin
if fUncertainOpt=AValue then exit;
fUncertainOpt:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetUseAnsiStr(const AValue: Boolean);
begin
if fUseAnsiStr=AValue then exit;
@ -840,14 +840,14 @@ begin
fUseValgrind:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetVarsInReg(const AValue: Boolean);
begin
if fVarsInReg=AValue then exit;
fVarsInReg:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetVerifyObjMethodCall(const AValue: boolean);
begin
if FVerifyObjMethodCall=AValue then exit;

View File

@ -1375,7 +1375,7 @@ var
Result:=SwitchPathDelims(SearchPath,PathDelimChange);
Result:=MinimizeSearchPath(Result);
end;
{
procedure ReadSmaller;
begin
if FileVersion<2 then begin
@ -1387,7 +1387,7 @@ var
end else
SmallerCode:=aXMLConfig.GetValue(p+'SmallerCode/Value',false);
end;
}
procedure ReadSmartLinkUnit;
begin
if FileVersion<3 then
@ -1485,9 +1485,9 @@ begin
TargetCPU := aXMLConfig.GetValue(p+'TargetCPU/Value', '');
TargetOS := aXMLConfig.GetValue(p+'TargetOS/Value', '');
OptimizationLevel := aXMLConfig.GetValue(p+'Optimizations/OptimizationLevel/Value', 1);
//VariablesInRegisters := aXMLConfig.GetValue(p+'Optimizations/VariablesInRegisters/Value', false);
//UncertainOptimizations := aXMLConfig.GetValue(p+'Optimizations/UncertainOptimizations/Value', false);
//ReadSmaller;
VariablesInRegisters := aXMLConfig.GetValue(p+'Optimizations/VariablesInRegisters/Value', false);
UncertainOptimizations := aXMLConfig.GetValue(p+'Optimizations/UncertainOptimizations/Value', false);
ReadSmaller;
{ Linking }
p:=Path+'Linking/';
@ -1700,9 +1700,9 @@ begin
aXMLConfig.SetDeleteValue(p+'TargetCPU/Value', TargetCPU,'');
aXMLConfig.SetDeleteValue(p+'TargetOS/Value', TargetOS,'');
aXMLConfig.SetDeleteValue(p+'Optimizations/OptimizationLevel/Value', OptimizationLevel,1);
//aXMLConfig.SetDeleteValue(p+'Optimizations/VariablesInRegisters/Value', VariablesInRegisters,false);
//aXMLConfig.SetDeleteValue(p+'Optimizations/UncertainOptimizations/Value', UncertainOptimizations,false);
//aXMLConfig.SetDeleteValue(p+'SmallerCode/Value', SmallerCode, false);
aXMLConfig.SetDeleteValue(p+'Optimizations/VariablesInRegisters/Value', VariablesInRegisters,false);
aXMLConfig.SetDeleteValue(p+'Optimizations/UncertainOptimizations/Value', UncertainOptimizations,false);
aXMLConfig.SetDeleteValue(p+'SmallerCode/Value', SmallerCode, false);
{ Linking }
p:=Path+'Linking/';
@ -2745,8 +2745,8 @@ begin
{ Optimizations }
OptimizeSwitches:='';
//if SmallerCode then
// OptimizeSwitches := OptimizeSwitches + 's';
if SmallerCode then
OptimizeSwitches := OptimizeSwitches + 's';
{ OptimizationLevel 1 = Level 1 2 = Level 2 3 = Level 3 }
case (OptimizationLevel) of
1: OptimizeSwitches := OptimizeSwitches + '1';
@ -2757,11 +2757,12 @@ begin
switches := switches + ' -O'+OptimizeSwitches;
// uncertain
//if (UncertainOptimizations) then
// Switches := Switches + ' -OoUNCERTAIN';
if (UncertainOptimizations) then
Switches := Switches + ' -OoUNCERTAIN';
// registers
//if (VariablesInRegisters) then
// Switches := Switches + ' -OoREGVAR';
if (VariablesInRegisters) then
Switches := Switches + ' -OoREGVAR';
CompilerFilename:=EnvironmentOptions.GetParsedCompilerFilename;
CodeToolBoss.FPCDefinesCache.ConfigCaches.GetDefaultCompilerTarget(
@ -3186,9 +3187,9 @@ begin
fTargetCPU := '';
fTargetProc := '';
fOptLevel := 1;
//fVarsInReg := false;
//fUncertainOpt := false;
//FSmallerCode := false;
fVarsInReg := false;
fUncertainOpt := false;
FSmallerCode := false;
// linking
fGenDebugInfo := True;
@ -3302,9 +3303,9 @@ begin
fTargetCPU := CompOpts.fTargetCPU;
fTargetProc := CompOpts.fTargetProc;
fOptLevel := CompOpts.fOptLevel;
//fVarsInReg := CompOpts.fVarsInReg;
//fUncertainOpt := CompOpts.fUncertainOpt;
//FSmallerCode := CompOpts.FSmallerCode;
fVarsInReg := CompOpts.fVarsInReg;
fUncertainOpt := CompOpts.fUncertainOpt;
FSmallerCode := CompOpts.FSmallerCode;
// Linking
fGenDebugInfo := CompOpts.fGenDebugInfo;
@ -3456,9 +3457,9 @@ begin
if Done(Tool.AddDiff('TargetCPU',fTargetCPU,CompOpts.fTargetCPU)) then exit;
if Done(Tool.AddDiff('TargetProc',fTargetProc,CompOpts.fTargetProc)) then exit;
if Done(Tool.AddDiff('OptLevel',fOptLevel,CompOpts.fOptLevel)) then exit;
//if Done(Tool.AddDiff('VarsInReg',fVarsInReg,CompOpts.fVarsInReg)) then exit;
//if Done(Tool.AddDiff('UncertainOpt',fUncertainOpt,CompOpts.fUncertainOpt)) then exit;
//if Done(Tool.AddDiff('SmallerCode',FSmallerCode,CompOpts.FSmallerCode)) then exit;
if Done(Tool.AddDiff('VarsInReg',fVarsInReg,CompOpts.fVarsInReg)) then exit;
if Done(Tool.AddDiff('UncertainOpt',fUncertainOpt,CompOpts.fUncertainOpt)) then exit;
if Done(Tool.AddDiff('SmallerCode',FSmallerCode,CompOpts.FSmallerCode)) then exit;
// linking
if Tool<>nil then Tool.Path:='Linking';