mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:39:44 +02:00
parent
8c9af59666
commit
8864f57fe4
@ -277,7 +277,7 @@ begin
|
||||
// Create Release mode
|
||||
NewMode:=fBuildModes.Add(ReleaseModeName);
|
||||
AssignAndSetBooleans(NewMode, False);
|
||||
NewMode.CompilerOptions.OptimizationLevel:=3; // Optimization
|
||||
NewMode.CompilerOptions.OptimizationLevel:=3; // Optimization, slow, but safe, -O4 is dangerous
|
||||
NewMode.CompilerOptions.DebugInfoType:=dsAuto; // Debug
|
||||
|
||||
FillBuildModesGrid; // show
|
||||
|
@ -2858,11 +2858,8 @@ begin
|
||||
if SmallerCode then
|
||||
OptimizeSwitches := OptimizeSwitches + 's';
|
||||
{ OptimizationLevel 1 = Level 1 2 = Level 2 3 = Level 3 }
|
||||
case (OptimizationLevel) of
|
||||
1: OptimizeSwitches := OptimizeSwitches + '1';
|
||||
2: OptimizeSwitches := OptimizeSwitches + '2';
|
||||
3: OptimizeSwitches := OptimizeSwitches + '3';
|
||||
end;
|
||||
if OptimizationLevel>0 then
|
||||
OptimizeSwitches := OptimizeSwitches + IntToStr(OptimizationLevel);
|
||||
if OptimizeSwitches<>'' then
|
||||
switches := switches + ' -O'+OptimizeSwitches;
|
||||
|
||||
|
@ -6,8 +6,8 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
ClientHeight = 523
|
||||
ClientWidth = 601
|
||||
TabOrder = 0
|
||||
DesignLeft = 290
|
||||
DesignTop = 90
|
||||
DesignLeft = 343
|
||||
DesignTop = 220
|
||||
object grpUnitStyle: TGroupBox
|
||||
AnchorSideLeft.Control = grpOptimizations
|
||||
AnchorSideTop.Control = grpOptimizations
|
||||
@ -16,7 +16,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 74
|
||||
Top = 185
|
||||
Top = 208
|
||||
Width = 146
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 5
|
||||
@ -60,7 +60,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 153
|
||||
Height = 80
|
||||
Top = 185
|
||||
Top = 208
|
||||
Width = 448
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -133,13 +133,16 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
object grpOptimizationLevels: TGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 128
|
||||
Height = 151
|
||||
Top = 0
|
||||
Width = 601
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
Caption = 'grpOptimizationLevels'
|
||||
ClientHeight = 111
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 3
|
||||
ChildSizing.VerticalSpacing = 2
|
||||
ClientHeight = 134
|
||||
ClientWidth = 597
|
||||
TabOrder = 2
|
||||
object radOptLevelNone: TRadioButton
|
||||
@ -150,8 +153,6 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
Top = 3
|
||||
Width = 124
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'radOptLevelNone'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
@ -163,11 +164,9 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 30
|
||||
Width = 210
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '1 (quick, debugger friendly) (-O1)'
|
||||
Top = 29
|
||||
Width = 101
|
||||
Caption = 'radOptLevel1'
|
||||
TabOrder = 1
|
||||
end
|
||||
object radOptLevel2: TRadioButton
|
||||
@ -176,10 +175,8 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 57
|
||||
Top = 55
|
||||
Width = 101
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'radOptLevel2'
|
||||
TabOrder = 2
|
||||
end
|
||||
@ -189,14 +186,22 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 84
|
||||
Top = 81
|
||||
Width = 101
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 3
|
||||
Caption = 'radOptLevel3'
|
||||
TabOrder = 3
|
||||
end
|
||||
object radOptLevel4: TRadioButton
|
||||
AnchorSideLeft.Control = radOptLevelNone
|
||||
AnchorSideTop.Control = radOptLevel3
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 107
|
||||
Width = 101
|
||||
Caption = 'radOptLevel4'
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
object grpLinking: TGroupBox
|
||||
AnchorSideLeft.Control = grpUnitStyle
|
||||
@ -206,7 +211,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 98
|
||||
Top = 270
|
||||
Top = 293
|
||||
Width = 601
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -261,7 +266,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
|
||||
object grpOptimizations: TGroupBox
|
||||
Left = 0
|
||||
Height = 47
|
||||
Top = 133
|
||||
Top = 156
|
||||
Width = 601
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
|
@ -31,6 +31,7 @@ type
|
||||
radOptLevel1: TRadioButton;
|
||||
radOptLevel2: TRadioButton;
|
||||
radOptLevel3: TRadioButton;
|
||||
radOptLevel4: TRadioButton;
|
||||
radOptLevelNone: TRadioButton;
|
||||
public
|
||||
function GetTitle: string; override;
|
||||
@ -68,6 +69,7 @@ begin
|
||||
radOptLevel1.Caption := dlgLevel1Opt + ' (-O1)';
|
||||
radOptLevel2.Caption := dlgLevel2Opt + ' (-O2)';
|
||||
radOptLevel3.Caption := dlgLevel3Opt + ' (-O3)';
|
||||
radOptLevel4.Caption := dlgLevel4Opt + ' (-O4)';
|
||||
|
||||
grpOptimizations.Caption := dlgOtherOptimizations;
|
||||
chkOptSmaller.Caption := lisSmallerRatherThanFaster + ' (-Os)';
|
||||
@ -97,6 +99,7 @@ begin
|
||||
1: radOptLevel1.Checked := True;
|
||||
2: radOptLevel2.Checked := True;
|
||||
3: radOptLevel3.Checked := True;
|
||||
4: radOptLevel4.Checked := True;
|
||||
else
|
||||
radOptLevelNone.Checked := True;
|
||||
end;
|
||||
@ -142,6 +145,9 @@ begin
|
||||
else
|
||||
if (radOptLevel3.Checked) then
|
||||
OptimizationLevel := 3
|
||||
else
|
||||
if (radOptLevel4.Checked) then
|
||||
OptimizationLevel := 4
|
||||
else
|
||||
OptimizationLevel := 0;
|
||||
|
||||
|
@ -2215,8 +2215,9 @@ resourcestring
|
||||
lisSmallerRatherThanFaster = 'Smaller rather than faster';
|
||||
dlgLevelNoneOpt = '0 (no optimization)';
|
||||
dlgLevel1Opt = '1 (quick, debugger friendly)';
|
||||
dlgLevel2Opt = '2 (quick optimizations)';
|
||||
dlgLevel3Opt = '3 (slow optimizations)';
|
||||
dlgLevel2Opt = '2 (-O1 + quick optimizations)';
|
||||
dlgLevel3Opt = '3 (-O2 + slow optimizations)';
|
||||
dlgLevel4Opt = '4 (-O3 + aggressive optimizations, beware)';
|
||||
dlgTargetOS = 'Target OS';
|
||||
dlgTargetCPUFamily = 'Target CPU family';
|
||||
dlgCOInfoForGDB = 'Info for GDB';
|
||||
|
Loading…
Reference in New Issue
Block a user