IDE: Added a check box for -WR compiler option. Issue #7154

git-svn-id: trunk@33527 -
This commit is contained in:
juha 2011-11-14 12:31:30 +00:00
parent 43d521337d
commit 81511cf49b
5 changed files with 130 additions and 105 deletions

View File

@ -1401,6 +1401,7 @@ begin
{ CodeGeneration } { CodeGeneration }
p:=Path+'CodeGeneration/'; p:=Path+'CodeGeneration/';
ReadSmartLinkUnit; ReadSmartLinkUnit;
RelocatableUnit := aXMLConfig.GetValue(p+'RelocatableUnit/Value', false);
IOChecks := aXMLConfig.GetValue(p+'Checks/IOChecks/Value', false); IOChecks := aXMLConfig.GetValue(p+'Checks/IOChecks/Value', false);
RangeChecks := aXMLConfig.GetValue(p+'Checks/RangeChecks/Value', false); RangeChecks := aXMLConfig.GetValue(p+'Checks/RangeChecks/Value', false);
OverflowChecks := aXMLConfig.GetValue(p+'Checks/OverflowChecks/Value', false); OverflowChecks := aXMLConfig.GetValue(p+'Checks/OverflowChecks/Value', false);
@ -1622,6 +1623,7 @@ begin
{ CodeGeneration } { CodeGeneration }
p:=Path+'CodeGeneration/'; p:=Path+'CodeGeneration/';
aXMLConfig.SetDeleteValue(p+'SmartLinkUnit/Value', SmartLinkUnit,false); aXMLConfig.SetDeleteValue(p+'SmartLinkUnit/Value', SmartLinkUnit,false);
aXMLConfig.SetDeleteValue(p+'RelocatableUnit/Value', RelocatableUnit,false);
aXMLConfig.SetDeleteValue(p+'Checks/IOChecks/Value', IOChecks,false); aXMLConfig.SetDeleteValue(p+'Checks/IOChecks/Value', IOChecks,false);
aXMLConfig.SetDeleteValue(p+'Checks/RangeChecks/Value', RangeChecks,false); aXMLConfig.SetDeleteValue(p+'Checks/RangeChecks/Value', RangeChecks,false);
aXMLConfig.SetDeleteValue(p+'Checks/OverflowChecks/Value', OverflowChecks,false); aXMLConfig.SetDeleteValue(p+'Checks/OverflowChecks/Value', OverflowChecks,false);
@ -2562,6 +2564,8 @@ begin
{ UnitStyle '' = Static 'D' = Dynamic (not implemented) 'X' = smart linked } { UnitStyle '' = Static 'D' = Dynamic (not implemented) 'X' = smart linked }
if SmartLinkUnit then if SmartLinkUnit then
switches := switches + ' -CX'; switches := switches + ' -CX';
if RelocatableUnit then
switches := switches + ' -WR';
{ Checks } { Checks }
tempsw := ''; tempsw := '';
@ -3148,6 +3152,7 @@ begin
// Code Generation // Code Generation
fSmartLinkUnit := CompOpts.SmartLinkUnit; fSmartLinkUnit := CompOpts.SmartLinkUnit;
fRelocatableUnit := CompOpts.RelocatableUnit;
fIOChecks := CompOpts.fIOChecks; fIOChecks := CompOpts.fIOChecks;
fRangeChecks := CompOpts.fRangeChecks; fRangeChecks := CompOpts.fRangeChecks;
fOverflowChecks := CompOpts.fOverflowChecks; fOverflowChecks := CompOpts.fOverflowChecks;
@ -3295,6 +3300,7 @@ begin
// code generation // code generation
if Tool<>nil then Tool.Path:='Code'; if Tool<>nil then Tool.Path:='Code';
if Done(Tool.AddDiff('SmartLinkUnit',fSmartLinkUnit,CompOpts.SmartLinkUnit)) then exit; if Done(Tool.AddDiff('SmartLinkUnit',fSmartLinkUnit,CompOpts.SmartLinkUnit)) then exit;
if Done(Tool.AddDiff('Relocatable',fRelocatableUnit,CompOpts.RelocatableUnit)) then exit;
if Done(Tool.AddDiff('IOChecks',fIOChecks,CompOpts.fIOChecks)) then exit; if Done(Tool.AddDiff('IOChecks',fIOChecks,CompOpts.fIOChecks)) then exit;
if Done(Tool.AddDiff('RangeChecks',fRangeChecks,CompOpts.fRangeChecks)) then exit; if Done(Tool.AddDiff('RangeChecks',fRangeChecks,CompOpts.fRangeChecks)) then exit;
if Done(Tool.AddDiff('OverflowChecks',fOverflowChecks,CompOpts.fOverflowChecks)) then exit; if Done(Tool.AddDiff('OverflowChecks',fOverflowChecks,CompOpts.fOverflowChecks)) then exit;

View File

@ -3,95 +3,103 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Width = 601 Width = 601
ClientHeight = 523 ClientHeight = 523
ClientWidth = 601 ClientWidth = 601
TabOrder = 0 DesignLeft = 271
DesignLeft = 415 DesignTop = 89
DesignTop = 197 object grpUnitStyle: TGroupBox[0]
object grpSmartLinkUnit: TGroupBox[0]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpChecks AnchorSideTop.Control = grpChecks
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpChecks AnchorSideRight.Control = grpChecks
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = grpHeapSize
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 0 Left = 0
Height = 51 Height = 74
Top = 139 Top = 149
Width = 148 Width = 168
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'grpSmartLinkUnit' Caption = 'grpUnitStyle'
ClientHeight = 33 ClientHeight = 56
ClientWidth = 144 ClientWidth = 164
TabOrder = 0 TabOrder = 0
object chkSmartLinkUnit: TCheckBox object chkSmartLinkUnit: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 6 Top = 6
Width = 132 Width = 152
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkSmartLinkUnit' Caption = 'chkSmartLinkUnit'
TabOrder = 0 TabOrder = 0
end end
object chkRelocatableUnit: TCheckBox
Left = 6
Height = 19
Top = 31
Width = 152
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkRelocatableUnit'
TabOrder = 1
end
end end
object grpChecks: TGroupBox[1] object grpChecks: TGroupBox[1]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 133 Height = 143
Top = 0 Top = 0
Width = 148 Width = 168
AutoSize = True AutoSize = True
Caption = 'grpChecks' Caption = 'grpChecks'
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 115 ClientHeight = 125
ClientWidth = 144 ClientWidth = 164
TabOrder = 1 TabOrder = 1
object chkChecksIO: TCheckBox object chkChecksIO: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 6 Top = 6
Width = 132 Width = 152
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkChecksIO' Caption = 'chkChecksIO'
TabOrder = 0 TabOrder = 0
end end
object chkChecksRange: TCheckBox object chkChecksRange: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 29 Top = 31
Width = 132 Width = 152
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkChecksRange' Caption = 'chkChecksRange'
TabOrder = 1 TabOrder = 1
end end
object chkChecksOverflow: TCheckBox object chkChecksOverflow: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 52 Top = 56
Width = 132 Width = 152
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkChecksOverflow' Caption = 'chkChecksOverflow'
TabOrder = 2 TabOrder = 2
end end
object chkChecksStack: TCheckBox object chkChecksStack: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 75 Top = 81
Width = 132 Width = 152
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkChecksStack' Caption = 'chkChecksStack'
TabOrder = 3 TabOrder = 3
end end
object chkVerifyObjMethodCall: TCheckBox object chkVerifyObjMethodCall: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 19
Top = 98 Top = 106
Width = 132 Width = 152
Caption = 'chkVerifyObjMethodCall' Caption = 'chkVerifyObjMethodCall'
TabOrder = 4 TabOrder = 4
end end
@ -103,23 +111,25 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 154 AnchorSideBottom.Control = grpUnitStyle
Height = 51 AnchorSideBottom.Side = asrBottom
Top = 139 Left = 174
Width = 447 Height = 74
Anchors = [akTop, akLeft, akRight] Top = 149
Width = 427
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'grpHeapSize' Caption = 'grpHeapSize'
ClientHeight = 33 ClientHeight = 56
ClientWidth = 443 ClientWidth = 423
TabOrder = 2 TabOrder = 2
object edtHeapSize: TEdit object edtHeapSize: TEdit
Left = 6 Left = 6
Height = 21 Height = 20
Top = 6 Top = 6
Width = 431 Width = 411
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 0 TabOrder = 0
@ -134,25 +144,25 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = grpChecks AnchorSideBottom.Control = grpChecks
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 154 Left = 174
Height = 133 Height = 143
Top = 0 Top = 0
Width = 447 Width = 427
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'grpTargetPlatform' Caption = 'grpTargetPlatform'
ClientHeight = 115 ClientHeight = 125
ClientWidth = 443 ClientWidth = 423
TabOrder = 3 TabOrder = 3
object lblTargetOS: TLabel object lblTargetOS: TLabel
AnchorSideLeft.Control = grpTargetPlatform AnchorSideLeft.Control = grpTargetPlatform
AnchorSideTop.Control = TargetOSComboBox AnchorSideTop.Control = TargetOSComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 14 Height = 15
Top = 9 Top = 9
Width = 57 Width = 65
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'lblTargetOS' Caption = 'lblTargetOS'
ParentColor = False ParentColor = False
@ -162,9 +172,9 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Control = TargetCPUComboBox AnchorSideTop.Control = TargetCPUComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 14 Height = 15
Top = 36 Top = 35
Width = 63 Width = 74
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'lblTargetCPU' Caption = 'lblTargetCPU'
ParentColor = False ParentColor = False
@ -174,9 +184,9 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Control = TargetProcessorProcComboBox AnchorSideTop.Control = TargetProcessorProcComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 14 Height = 15
Top = 63 Top = 61
Width = 111 Width = 130
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'lblTargetProcessorProc' Caption = 'lblTargetProcessorProc'
ParentColor = False ParentColor = False
@ -187,17 +197,16 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Control = grpTargetPlatform AnchorSideTop.Control = grpTargetPlatform
AnchorSideRight.Control = grpTargetPlatform AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 75 Left = 83
Height = 21 Height = 20
Top = 6 Top = 6
Width = 362 Width = 334
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 13 ItemHeight = 0
TabOrder = 0
Style = csDropDownList Style = csDropDownList
Text = 'TargetOSComboBox' TabOrder = 0
end end
object TargetCPUComboBox: TComboBox object TargetCPUComboBox: TComboBox
AnchorSideLeft.Control = lblTargetCPU AnchorSideLeft.Control = lblTargetCPU
@ -206,17 +215,16 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpTargetPlatform AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 81 Left = 92
Height = 21 Height = 20
Top = 33 Top = 32
Width = 356 Width = 325
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 13 ItemHeight = 0
TabOrder = 1
Style = csDropDownList Style = csDropDownList
Text = 'TargetCPUComboBox' TabOrder = 1
end end
object TargetProcessorProcComboBox: TComboBox object TargetProcessorProcComboBox: TComboBox
AnchorSideLeft.Control = lblTargetProcessorProc AnchorSideLeft.Control = lblTargetProcessorProc
@ -225,97 +233,93 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpTargetPlatform AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 129 Left = 148
Height = 21 Height = 20
Top = 60 Top = 58
Width = 308 Width = 269
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 13 ItemHeight = 0
TabOrder = 2
Style = csDropDownList Style = csDropDownList
Text = 'TargetProcessorProcComboBox' TabOrder = 2
end end
end end
object grpOptimizations: TGroupBox[4] object grpOptimizations: TGroupBox[4]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpSmartLinkUnit AnchorSideTop.Control = grpUnitStyle
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 0 Left = 0
Height = 327 Height = 294
Top = 196 Top = 229
Width = 601 Width = 601
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'grpOptimizations' Caption = 'grpOptimizations'
ClientHeight = 309 ClientHeight = 276
ClientWidth = 597 ClientWidth = 597
TabOrder = 4 TabOrder = 4
object radOptLevelNone: TRadioButton object radOptLevelNone: TRadioButton
AnchorSideLeft.Control = grpOptimizations AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = grpOptimizations AnchorSideTop.Control = grpOptimizations
Left = 6 Left = 6
Height = 17 Height = 20
Top = 6 Top = 6
Width = 102 Width = 120
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'radOptLevelNone' Caption = 'radOptLevelNone'
Checked = True Checked = True
State = cbChecked
TabOrder = 0 TabOrder = 0
TabStop = True
end end
object radOptLevel1: TRadioButton object radOptLevel1: TRadioButton
AnchorSideLeft.Control = grpOptimizations AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = radOptLevelNone AnchorSideTop.Control = radOptLevelNone
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 20
Top = 29 Top = 32
Width = 83 Width = 97
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'radOptLevel1' Caption = 'radOptLevel1'
TabOrder = 1 TabOrder = 1
TabStop = False
end end
object radOptLevel2: TRadioButton object radOptLevel2: TRadioButton
AnchorSideLeft.Control = grpOptimizations AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = radOptLevel1 AnchorSideTop.Control = radOptLevel1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 20
Top = 52 Top = 58
Width = 83 Width = 97
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'radOptLevel2' Caption = 'radOptLevel2'
TabOrder = 2 TabOrder = 2
TabStop = False
end end
object radOptLevel3: TRadioButton object radOptLevel3: TRadioButton
AnchorSideLeft.Control = grpOptimizations AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = radOptLevel2 AnchorSideTop.Control = radOptLevel2
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 20
Top = 75 Top = 84
Width = 83 Width = 97
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'radOptLevel3' Caption = 'radOptLevel3'
TabOrder = 3 TabOrder = 3
TabStop = False
end end
object chkOptVarsInReg: TCheckBox object chkOptVarsInReg: TCheckBox
AnchorSideLeft.Control = grpOptimizations AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = Bevel1 AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 19
Top = 107 Top = 119
Width = 102 Width = 119
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
@ -327,9 +331,9 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Control = chkOptVarsInReg AnchorSideTop.Control = chkOptVarsInReg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 19
Top = 130 Top = 144
Width = 98 Width = 115
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
@ -342,9 +346,9 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 19
Top = 153 Top = 169
Width = 86 Width = 105
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
@ -359,7 +363,7 @@ inherited CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 3 Height = 3
Top = 98 Top = 110
Width = 585 Width = 585
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6

View File

@ -24,12 +24,13 @@ type
chkOptUncertain: TCheckBox; chkOptUncertain: TCheckBox;
chkOptVarsInReg: TCheckBox; chkOptVarsInReg: TCheckBox;
chkSmartLinkUnit: TCheckBox; chkSmartLinkUnit: TCheckBox;
chkRelocatableUnit: TCheckBox;
chkVerifyObjMethodCall: TCheckBox; chkVerifyObjMethodCall: TCheckBox;
edtHeapSize: TEdit; edtHeapSize: TEdit;
grpChecks: TGroupBox; grpChecks: TGroupBox;
grpHeapSize: TGroupBox; grpHeapSize: TGroupBox;
grpOptimizations: TGroupBox; grpOptimizations: TGroupBox;
grpSmartLinkUnit: TGroupBox; grpUnitStyle: TGroupBox;
grpTargetPlatform: TGroupBox; grpTargetPlatform: TGroupBox;
lblTargetCPU: TLabel; lblTargetCPU: TLabel;
lblTargetOS: TLabel; lblTargetOS: TLabel;
@ -109,8 +110,9 @@ end;
procedure TCompilerCodegenOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog); procedure TCompilerCodegenOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin begin
grpSmartLinkUnit.Caption := dlgCOUnitStyle; grpUnitStyle.Caption := dlgCOUnitStyle;
chkSmartLinkUnit.Caption := dlgCOSmartLinkable + ' (-CX)'; chkSmartLinkUnit.Caption := dlgCOSmartLinkable + ' (-CX)';
chkRelocatableUnit.Caption := dlgCORelocatable + ' (-WR)';
grpChecks.Caption := dlgCOChecks; grpChecks.Caption := dlgCOChecks;
chkChecksIO.Caption := 'I/O (-Ci)'; chkChecksIO.Caption := 'I/O (-Ci)';
@ -214,6 +216,7 @@ begin
with AOptions as TBaseCompilerOptions do with AOptions as TBaseCompilerOptions do
begin begin
chkSmartLinkUnit.Checked := SmartLinkUnit; chkSmartLinkUnit.Checked := SmartLinkUnit;
chkRelocatableUnit.Checked := RelocatableUnit;
chkChecksIO.Checked := IOChecks; chkChecksIO.Checked := IOChecks;
chkChecksRange.Checked := RangeChecks; chkChecksRange.Checked := RangeChecks;
@ -260,6 +263,7 @@ begin
with AOptions as TBaseCompilerOptions do with AOptions as TBaseCompilerOptions do
begin begin
SmartLinkUnit := chkSmartLinkUnit.Checked; SmartLinkUnit := chkSmartLinkUnit.Checked;
RelocatableUnit := chkRelocatableUnit.Checked;
IOChecks := chkChecksIO.Checked; IOChecks := chkChecksIO.Checked;
RangeChecks := chkChecksRange.Checked; RangeChecks := chkChecksRange.Checked;

View File

@ -1804,6 +1804,7 @@ resourcestring
dlgGPCComp = 'GPC (GNU Pascal Compiler) Compatible'; dlgGPCComp = 'GPC (GNU Pascal Compiler) Compatible';
dlgCOUnitStyle = 'Unit Style'; dlgCOUnitStyle = 'Unit Style';
dlgCOSmartLinkable = 'Smart Linkable'; dlgCOSmartLinkable = 'Smart Linkable';
dlgCORelocatable = 'Relocatable';
dlgCOChecks = 'Checks'; dlgCOChecks = 'Checks';
dlgCORange = 'Range'; dlgCORange = 'Range';
dlgCOOverflow = 'Overflow'; dlgCOOverflow = 'Overflow';

View File

@ -147,6 +147,7 @@ type
procedure SetShowWarn(const AValue: Boolean); procedure SetShowWarn(const AValue: Boolean);
procedure SetSmallerCode(const AValue: boolean); procedure SetSmallerCode(const AValue: boolean);
procedure SetSmartLinkUnit(const AValue: Boolean); procedure SetSmartLinkUnit(const AValue: Boolean);
procedure SetRelocatableUnit(const AValue: Boolean);
procedure SetStackChecks(const AValue: Boolean); procedure SetStackChecks(const AValue: Boolean);
procedure SetStaticKeyword(const AValue: Boolean); procedure SetStaticKeyword(const AValue: Boolean);
procedure SetStopAfterErrCount(const AValue: integer); procedure SetStopAfterErrCount(const AValue: integer);
@ -192,6 +193,7 @@ type
// Code generation: // Code generation:
fSmartLinkUnit: Boolean; fSmartLinkUnit: Boolean;
fRelocatableUnit: Boolean;
fIOChecks: Boolean; fIOChecks: Boolean;
fRangeChecks: Boolean; fRangeChecks: Boolean;
fOverflowChecks: Boolean; fOverflowChecks: Boolean;
@ -333,6 +335,7 @@ type
property OverflowChecks: Boolean read fOverflowChecks write SetOverflowChecks; property OverflowChecks: Boolean read fOverflowChecks write SetOverflowChecks;
property StackChecks: Boolean read fStackChecks write SetStackChecks; property StackChecks: Boolean read fStackChecks write SetStackChecks;
property SmartLinkUnit: Boolean read fSmartLinkUnit write SetSmartLinkUnit; property SmartLinkUnit: Boolean read fSmartLinkUnit write SetSmartLinkUnit;
property RelocatableUnit: Boolean read fRelocatableUnit write SetRelocatableUnit;
property EmulatedFloatOpcodes: boolean read SetEmulatedFloatOpcodes property EmulatedFloatOpcodes: boolean read SetEmulatedFloatOpcodes
write SetEmulatedFloatOpcodes; write SetEmulatedFloatOpcodes;
property HeapSize: Integer read fHeapSize write SetHeapSize; property HeapSize: Integer read fHeapSize write SetHeapSize;
@ -604,6 +607,13 @@ begin
IncreaseChangeStamp; IncreaseChangeStamp;
end; end;
procedure TLazCompilerOptions.SetRelocatableUnit(const AValue: Boolean);
begin
if fRelocatableUnit=AValue then exit;
fRelocatableUnit:=AValue;
IncreaseChangeStamp;
end;
procedure TLazCompilerOptions.SetStackChecks(const AValue: Boolean); procedure TLazCompilerOptions.SetStackChecks(const AValue: Boolean);
begin begin
if fStackChecks=AValue then exit; if fStackChecks=AValue then exit;