diff --git a/.gitattributes b/.gitattributes index 4067a93d4c..e5c7463b39 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3399,6 +3399,9 @@ ide/frames/codetools_wordpolicy_options.pas svneol=native#text/pascal ide/frames/compiler_codegen_options.lfm svneol=native#text/plain ide/frames/compiler_codegen_options.lrs svneol=native#text/pascal ide/frames/compiler_codegen_options.pas svneol=native#text/pascal +ide/frames/compiler_linking_options.lfm svneol=native#text/plain +ide/frames/compiler_linking_options.lrs svneol=native#text/pascal +ide/frames/compiler_linking_options.pas svneol=native#text/pascal ide/frames/compiler_messages_options.lfm svneol=native#text/plain ide/frames/compiler_messages_options.lrs svneol=native#text/plain ide/frames/compiler_messages_options.pas svneol=native#text/plain diff --git a/ide/frames/compiler_linking_options.lfm b/ide/frames/compiler_linking_options.lfm new file mode 100644 index 0000000000..9df03a8ef2 --- /dev/null +++ b/ide/frames/compiler_linking_options.lfm @@ -0,0 +1,194 @@ +inherited CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame + Height = 460 + Width = 639 + ClientHeight = 460 + ClientWidth = 639 + DesignLeft = 346 + DesignTop = 181 + object grpLinkLibraries: TGroupBox[0] + Left = 0 + Height = 47 + Top = 214 + Width = 639 + Align = alTop + AutoSize = True + BorderSpacing.Top = 6 + Caption = 'grpLinkLibraries' + ClientHeight = 29 + ClientWidth = 635 + TabOrder = 0 + object chkLinkSmart: TCheckBox + Left = 6 + Height = 17 + Top = 6 + Width = 623 + Align = alTop + BorderSpacing.Around = 6 + Caption = 'chkLinkSmart' + TabOrder = 0 + end + end + object TargetSpecificsGrpBox: TGroupBox[1] + Left = 0 + Height = 47 + Top = 267 + Width = 639 + Align = alTop + AutoSize = True + BorderSpacing.Top = 6 + Caption = 'TargetSpecificsGrpBox' + ClientHeight = 29 + ClientWidth = 635 + TabOrder = 1 + object chkWin32GraphicApp: TCheckBox + Left = 6 + Height = 17 + Top = 6 + Width = 623 + Align = alTop + BorderSpacing.Around = 6 + Caption = 'chkWin32GraphicApp' + TabOrder = 0 + end + end + object grpOptions: TGroupBox[2] + Left = 0 + Height = 74 + Top = 320 + Width = 639 + Align = alTop + AutoSize = True + BorderSpacing.Top = 6 + Caption = 'grpOptions' + ClientHeight = 56 + ClientWidth = 635 + TabOrder = 2 + object chkOptionsLinkOpt: TCheckBox + Left = 6 + Height = 17 + Top = 6 + Width = 623 + Align = alTop + BorderSpacing.Around = 6 + Caption = 'chkOptionsLinkOpt' + TabOrder = 0 + end + object edtOptionsLinkOpt: TEdit + Left = 6 + Height = 21 + Top = 29 + Width = 623 + Align = alTop + BorderSpacing.Around = 6 + TabOrder = 1 + Text = 'edtOptionsLinkOpt' + end + end + object grpDebugging: TGroupBox[3] + Left = 0 + Height = 208 + Top = 0 + Width = 639 + Align = alTop + AutoSize = True + Caption = 'grpDebugging' + ClientHeight = 190 + ClientWidth = 635 + TabOrder = 3 + object chkDebugGDB: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = grpDebugging + Left = 6 + Height = 17 + Top = 6 + Width = 85 + BorderSpacing.Around = 6 + Caption = 'chkDebugGDB' + TabOrder = 0 + end + object chkUseLineInfoUnit: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkDebugGDB + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 29 + Width = 110 + BorderSpacing.Around = 6 + Caption = 'chkUseLineInfoUnit' + TabOrder = 1 + end + object chkUseHeaptrc: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkGenerateDwarf + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 75 + Width = 90 + BorderSpacing.Around = 6 + Caption = 'chkUseHeaptrc' + TabOrder = 2 + end + object chkUseValgrind: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkUseHeaptrc + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 98 + Width = 90 + BorderSpacing.Around = 6 + Caption = 'chkUseValgrind' + TabOrder = 3 + end + object chkGenGProfCode: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkUseValgrind + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 121 + Width = 105 + BorderSpacing.Around = 6 + Caption = 'chkGenGProfCode' + TabOrder = 4 + end + object chkSymbolsStrip: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkGenGProfCode + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 144 + Width = 95 + BorderSpacing.Around = 6 + Caption = 'chkSymbolsStrip' + TabOrder = 5 + end + object chkUseExternalDbgSyms: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkSymbolsStrip + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 167 + Width = 136 + BorderSpacing.Around = 6 + Caption = 'chkUseExternalDbgSyms' + TabOrder = 6 + end + object chkGenerateDwarf: TCheckBox + AnchorSideLeft.Control = grpDebugging + AnchorSideTop.Control = chkUseLineInfoUnit + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 17 + Top = 52 + Width = 108 + BorderSpacing.Around = 6 + Caption = 'chkGenerateDwarf' + TabOrder = 7 + end + end +end diff --git a/ide/frames/compiler_linking_options.lrs b/ide/frames/compiler_linking_options.lrs new file mode 100644 index 0000000000..96a36e4056 --- /dev/null +++ b/ide/frames/compiler_linking_options.lrs @@ -0,0 +1,62 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TCompilerLinkingOptionsFrame','FORMDATA',[ + 'TPF0'#241#28'TCompilerLinkingOptionsFrame'#27'CompilerLinkingOptionsFrame'#6 + +'Height'#3#204#1#5'Width'#3#127#2#12'ClientHeight'#3#204#1#11'ClientWidth'#3 + +#127#2#10'DesignLeft'#3'Z'#1#9'DesignTop'#3#181#0#0#242#2#0#9'TGroupBox'#16 + +'grpLinkLibraries'#4'Left'#2#0#6'Height'#2'/'#3'Top'#3#214#0#5'Width'#3#127#2 + +#5'Align'#7#5'alTop'#8'AutoSize'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#16 + +'grpLinkLibraries'#12'ClientHeight'#2#29#11'ClientWidth'#3'{'#2#8'TabOrder'#2 + +#0#0#9'TCheckBox'#12'chkLinkSmart'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#6#5'W' + +'idth'#3'o'#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6 + +#12'chkLinkSmart'#8'TabOrder'#2#0#0#0#0#242#2#1#9'TGroupBox'#21'TargetSpecif' + +'icsGrpBox'#4'Left'#2#0#6'Height'#2'/'#3'Top'#3#11#1#5'Width'#3#127#2#5'Alig' + +'n'#7#5'alTop'#8'AutoSize'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#21'Targe' + +'tSpecificsGrpBox'#12'ClientHeight'#2#29#11'ClientWidth'#3'{'#2#8'TabOrder'#2 + +#1#0#9'TCheckBox'#18'chkWin32GraphicApp'#4'Left'#2#6#6'Height'#2#17#3'Top'#2 + +#6#5'Width'#3'o'#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Captio' + +'n'#6#18'chkWin32GraphicApp'#8'TabOrder'#2#0#0#0#0#242#2#2#9'TGroupBox'#10'g' + +'rpOptions'#4'Left'#2#0#6'Height'#2'J'#3'Top'#3'@'#1#5'Width'#3#127#2#5'Alig' + +'n'#7#5'alTop'#8'AutoSize'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#10'grpOp' + +'tions'#12'ClientHeight'#2'8'#11'ClientWidth'#3'{'#2#8'TabOrder'#2#2#0#9'TCh' + +'eckBox'#17'chkOptionsLinkOpt'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#6#5'Width' + +#3'o'#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#17'chk' + +'OptionsLinkOpt'#8'TabOrder'#2#0#0#0#5'TEdit'#17'edtOptionsLinkOpt'#4'Left'#2 + +#6#6'Height'#2#21#3'Top'#2#29#5'Width'#3'o'#2#5'Align'#7#5'alTop'#20'BorderS' + +'pacing.Around'#2#6#8'TabOrder'#2#1#4'Text'#6#17'edtOptionsLinkOpt'#0#0#0#242 + +#2#3#9'TGroupBox'#12'grpDebugging'#4'Left'#2#0#6'Height'#3#208#0#3'Top'#2#0#5 + +'Width'#3#127#2#5'Align'#7#5'alTop'#8'AutoSize'#9#7'Caption'#6#12'grpDebuggi' + +'ng'#12'ClientHeight'#3#190#0#11'ClientWidth'#3'{'#2#8'TabOrder'#2#3#0#9'TCh' + +'eckBox'#11'chkDebugGDB'#22'AnchorSideLeft.Control'#7#12'grpDebugging'#21'An' + +'chorSideTop.Control'#7#12'grpDebugging'#4'Left'#2#6#6'Height'#2#17#3'Top'#2 + +#6#5'Width'#2'U'#20'BorderSpacing.Around'#2#6#7'Caption'#6#11'chkDebugGDB'#8 + +'TabOrder'#2#0#0#0#9'TCheckBox'#18'chkUseLineInfoUnit'#22'AnchorSideLeft.Con' + +'trol'#7#12'grpDebugging'#21'AnchorSideTop.Control'#7#11'chkDebugGDB'#18'Anc' + +'horSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#29#5'Wi' + +'dth'#2'n'#20'BorderSpacing.Around'#2#6#7'Caption'#6#18'chkUseLineInfoUnit'#8 + +'TabOrder'#2#1#0#0#9'TCheckBox'#13'chkUseHeaptrc'#22'AnchorSideLeft.Control' + +#7#12'grpDebugging'#21'AnchorSideTop.Control'#7#16'chkGenerateDwarf'#18'Anch' + +'orSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'K'#5'Wid' + +'th'#2'Z'#20'BorderSpacing.Around'#2#6#7'Caption'#6#13'chkUseHeaptrc'#8'TabO' + +'rder'#2#2#0#0#9'TCheckBox'#14'chkUseValgrind'#22'AnchorSideLeft.Control'#7 + +#12'grpDebugging'#21'AnchorSideTop.Control'#7#13'chkUseHeaptrc'#18'AnchorSid' + +'eTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'b'#5'Width'#2 + +'Z'#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'chkUseValgrind'#8'TabOrder' + +#2#3#0#0#9'TCheckBox'#15'chkGenGProfCode'#22'AnchorSideLeft.Control'#7#12'gr' + +'pDebugging'#21'AnchorSideTop.Control'#7#14'chkUseValgrind'#18'AnchorSideTop' + +'.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'y'#5'Width'#2'i' + +#20'BorderSpacing.Around'#2#6#7'Caption'#6#15'chkGenGProfCode'#8'TabOrder'#2 + +#4#0#0#9'TCheckBox'#15'chkSymbolsStrip'#22'AnchorSideLeft.Control'#7#12'grpD' + +'ebugging'#21'AnchorSideTop.Control'#7#15'chkGenGProfCode'#18'AnchorSideTop.' + +'Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#144#0#5'Width'#2'_' + +#20'BorderSpacing.Around'#2#6#7'Caption'#6#15'chkSymbolsStrip'#8'TabOrder'#2 + +#5#0#0#9'TCheckBox'#21'chkUseExternalDbgSyms'#22'AnchorSideLeft.Control'#7#12 + +'grpDebugging'#21'AnchorSideTop.Control'#7#15'chkSymbolsStrip'#18'AnchorSide' + +'Top.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#167#0#5'Width' + +#3#136#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#21'chkUseExternalDbgSyms' + +#8'TabOrder'#2#6#0#0#9'TCheckBox'#16'chkGenerateDwarf'#22'AnchorSideLeft.Con' + +'trol'#7#12'grpDebugging'#21'AnchorSideTop.Control'#7#18'chkUseLineInfoUnit' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'4' + +#5'Width'#2'l'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'chkGenerateDwarf' + +#8'TabOrder'#2#7#0#0#0#0 +]); diff --git a/ide/frames/compiler_linking_options.pas b/ide/frames/compiler_linking_options.pas new file mode 100644 index 0000000000..4dfa2c05fc --- /dev/null +++ b/ide/frames/compiler_linking_options.pas @@ -0,0 +1,134 @@ +unit compiler_linking_options; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, IDEOptionsIntf, Project, CompilerOptions, LazarusIDEStrConsts; + +type + + { TCompilerLinkingOptionsFrame } + + TCompilerLinkingOptionsFrame = class(TAbstractIDEOptionsEditor) + chkDebugGDB: TCheckBox; + chkGenerateDwarf: TCheckBox; + chkGenGProfCode: TCheckBox; + chkLinkSmart: TCheckBox; + chkOptionsLinkOpt: TCheckBox; + chkSymbolsStrip: TCheckBox; + chkUseExternalDbgSyms: TCheckBox; + chkUseHeaptrc: TCheckBox; + chkUseLineInfoUnit: TCheckBox; + chkUseValgrind: TCheckBox; + chkWin32GraphicApp: TCheckBox; + edtOptionsLinkOpt: TEdit; + grpDebugging: TGroupBox; + grpLinkLibraries: TGroupBox; + grpOptions: TGroupBox; + TargetSpecificsGrpBox: TGroupBox; + public + function GetTitle: string; override; + procedure Setup(ADialog: TAbstractOptionsEditorDialog); override; + procedure ReadSettings(AOptions: TAbstractIDEOptions); override; + procedure WriteSettings(AOptions: TAbstractIDEOptions); override; + class function SupportedOptionsClass: TAbstractIDEOptionsClass; override; + end; + +implementation + +{ TCompilerLinkingOptionsFrame } + +function TCompilerLinkingOptionsFrame.GetTitle: string; +begin + Result := dlgCOLinking; +end; + +procedure TCompilerLinkingOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog); +begin + // Setup the Linking Tab + with grpDebugging do + begin + AutoSize := True; + Caption := dlgCODebugging; + end; + + chkDebugGDB.Caption := dlgCOGDB + ' (-g)'; + chkUseLineInfoUnit.Caption := dlgLNumsBct + ' (-gl)'; + chkGenerateDwarf.Caption := dlgGenerateDwarf + '(-gw)'; + chkUseHeaptrc.Caption := dlgCOHeaptrc + ' (-gh)'; + chkUseValgrind.Caption := dlgCOValgrind + ' (-gv)'; + chkGenGProfCode.Caption := dlgGPROF + ' (-pg)'; + chkSymbolsStrip.Caption := dlgCOStrip + ' (-Xs)'; + chkUseExternalDbgSyms.Caption := dlgExtSymb + ' (-Xg)'; + + grpLinkLibraries.Caption := dlgLinkLibraries; + chkLinkSmart.Caption := dlgLinkSmart + ' (-XX)'; + + TargetSpecificsGrpBox.Caption := lisCOTargetOSSpecificOptions; + chkWin32GraphicApp.Caption := dlgWin32GUIApp + ' (-WG)'; + + grpOptions.Caption := dlgCOOpts + ' (-k)'; + chkOptionsLinkOpt.Caption := dlgPassOptsLinker; + edtOptionsLinkOpt.Text := ''; +end; + +procedure TCompilerLinkingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions); +begin + with AOptions as TProjectCompilerOptions do + begin + chkDebugGDB.Checked := GenerateDebugInfo; + chkUseLineInfoUnit.Checked := UseLineInfoUnit; + chkGenerateDwarf.Checked := GenerateDwarf; + chkUseHeaptrc.Checked := UseHeaptrc; + chkUseValgrind.Checked := UseValgrind; + chkGenGProfCode.Checked := GenGProfCode; + chkSymbolsStrip.Checked := StripSymbols; + chkSymbolsStrip.Enabled := NeedsLinkerOpts; + chkUseExternalDbgSyms.Checked := UseExternalDbgSyms; + + chkLinkSmart.Checked := LinkSmart; + grpLinkLibraries.Enabled := NeedsLinkerOpts; + + chkOptionsLinkOpt.Checked := PassLinkerOptions; + edtOptionsLinkOpt.Text := LinkerOptions; + chkWin32GraphicApp.Checked := Win32GraphicApp; + chkWin32GraphicApp.Enabled := NeedsLinkerOpts; + grpOptions.Enabled := NeedsLinkerOpts; + end; +end; + +procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions); +begin + with AOptions as TProjectCompilerOptions do + begin + GenerateDebugInfo := chkDebugGDB.Checked; + UseLineInfoUnit := chkUseLineInfoUnit.Checked; + GenerateDwarf := chkGenerateDwarf.Checked; + UseHeaptrc := chkUseHeaptrc.Checked; + UseValgrind := chkUseValgrind.Checked; + GenGProfCode := chkGenGProfCode.Checked; + StripSymbols := chkSymbolsStrip.Checked; + UseExternalDbgSyms := chkUseExternalDbgSyms.Checked; + + PassLinkerOptions := chkOptionsLinkOpt.Checked; + LinkerOptions := edtOptionsLinkOpt.Text; + Win32GraphicApp := chkWin32GraphicApp.Checked; + LinkSmart := chkLinkSmart.Checked; + end; +end; + +class function TCompilerLinkingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; +begin + Result := TProjectCompilerOptions; +end; + +initialization + {$I compiler_linking_options.lrs} + RegisterIDEOptionsEditor(GroupCompiler, TCompilerLinkingOptionsFrame, + CompilerOptionsLinking); + +end. + diff --git a/ide/lazarus.lpi b/ide/lazarus.lpi index 16da39ccba..bd2813fff3 100644 --- a/ide/lazarus.lpi +++ b/ide/lazarus.lpi @@ -43,7 +43,7 @@ - + @@ -477,6 +477,13 @@ + + + + + + + diff --git a/ide/main.pp b/ide/main.pp index 1d745c81aa..14b94a605a 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -127,7 +127,7 @@ uses project_misc_options, // project compiler options compiler_path_options, compiler_parsing_options, compiler_codegen_options, - compiler_messages_options, + compiler_linking_options, compiler_messages_options, PublishModule, EnvironmentOpts, TransferMacros, KeyMapping, IDETranslations, IDEProcs, ExtToolDialog, ExtToolEditDlg, OutputFilter, JumpHistoryView,