From a8deedbaaba064a38434474e0d6e2ee8e19a586f Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 10 Mar 2021 20:33:49 +0000 Subject: * finished -ix output git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48936 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/options.pas | 127 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 8 deletions(-) diff --git a/compiler/options.pas b/compiler/options.pas index 93dc60fc8d..0dab63c9f1 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -283,6 +283,22 @@ const end; end; + procedure ListOSTargetsXML; + var + target : tsystem; + begin + WriteLn(xmloutput,' '); + for target:=low(tsystem) to high(tsystem) do + if assigned(targetinfos[target]) then + begin + Write(xmloutput,' '); + end; + WriteLn(xmloutput,' '); + end; + procedure ListCPUInstructionSets (OrigString: TCmdStr); var cpu : tcputype; @@ -321,6 +337,17 @@ const end; end; + procedure ListCPUInstructionSetsXML; + var + cpu : tcputype; + begin + WriteLn(xmloutput,' '); + for cpu:=low(tcputype) to high(tcputype) do + if CPUTypeStr [CPU] <> '' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListFPUInstructionSets (OrigString: TCmdStr); var fpu : tfputype; @@ -359,6 +386,17 @@ const end; end; + procedure ListFPUInstructionSetsXML; + var + fpu : tfputype; + begin + WriteLn(xmloutput,' '); + for fpu:=low(tfputype) to high(tfputype) do + if FPUTypeStr [fpu] <> '' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListABITargets (OrigString: TCmdStr); var abi : tabi; @@ -383,6 +421,21 @@ const end; end; + procedure ListABITargetsXML; + var + abi : tabi; + begin + WriteLn(xmloutput,' '); + for abi:=low(abi) to high(abi) do + begin + if not abiinfo[abi].supported then + continue; + if abiinfo[abi].name<>'' then; + WriteLn(xmloutput,' '); + end; + WriteLn(xmloutput,' '); + end; + procedure ListOptimizations (OrigString: TCmdStr); var opt : toptimizerswitch; @@ -412,11 +465,11 @@ const var opt: toptimizerswitch; begin - WriteLn(xmloutput,''); + WriteLn(xmloutput,' '); for opt:=low(toptimizerswitch) to high(toptimizerswitch) do if OptimizerSwitchStr[opt]<>'' then - WriteLn(xmloutput,''); - WriteLn(xmloutput,''); + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); end; procedure ListWPOptimizations (OrigString: TCmdStr); @@ -446,6 +499,17 @@ const end; end; + procedure ListWPOptimizationsXML; + var + wpopt: twpoptimizerswitch; + begin + WriteLn(xmloutput,' '); + for wpopt:=low(twpoptimizerswitch) to high(twpoptimizerswitch) do + if WPOptimizerSwitchStr[wpopt]<>'' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListAsmModes (OrigString: TCmdStr); var asmmode : tasmmode; @@ -469,6 +533,17 @@ const end; end; + procedure ListAsmModesXML; + var + asmmode : tasmmode; + begin + WriteLn(xmloutput,' '); + for asmmode:=low(tasmmode) to high(tasmmode) do + if assigned(asmmodeinfos[asmmode]) then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListControllerTypes (OrigString: TCmdStr); var controllertype : tcontrollertype; @@ -522,11 +597,11 @@ const {$WARN 6018 OFF} (* Unreachable code due to compile time evaluation *) if (ControllerSupport) then begin - WriteLn(xmloutput,''); + WriteLn(xmloutput,' '); for controllertype:=low(tcontrollertype) to high(tcontrollertype) do if embedded_controllers[controllertype].ControllerTypeStr<>'' then - WriteLn(xmloutput,''); - WriteLn(xmloutput,''); + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); end; {$POP} end; @@ -569,6 +644,17 @@ const end; end; + procedure ListFeaturesXML; + var + Feature: TFeature; + begin + WriteLn(xmloutput,' '); + for Feature := Low (TFeature) to High (TFeature) do + if FeatureStr [Feature] <> '' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListModeswitches (OrigString: TCmdStr); var Modeswitch: TModeswitch; @@ -607,6 +693,17 @@ const end; end; + procedure ListModeswitchesXML; + var + Modeswitch: TModeswitch; + begin + WriteLn(xmloutput,' '); + for Modeswitch:=Low(TModeswitch) to High(TModeswitch) do + if ModeswitchStr [Modeswitch]<>'' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); + end; + procedure ListCodeGenerationBackend (OrigString: TCmdStr); begin SplitLine (OrigString, CodeGenerationBackendPlaceholder, HS3); @@ -621,6 +718,11 @@ const end; end; + procedure ListCodeGenerationBackendXML; + begin + WriteLn(xmloutput,' ',cgbackend2str[cgbackend],''); + end; + begin if More = '' then begin @@ -662,10 +764,19 @@ begin Rewrite(xmloutput); WriteLn(xmloutput,''); WriteLn(xmloutput,''); - WriteLn(xmloutput,''); + WriteLn(xmloutput,' '); + ListOSTargetsXML; + ListCPUInstructionSetsXML; + ListFPUInstructionSetsXML; + ListABITargetsXML; ListOptimizationsXML; + ListWPOptimizationsXML; + ListModeswitchesXML; + ListAsmModesXML; ListControllerTypesXML; - WriteLn(xmloutput,''); + ListFeaturesXML; + ListCodeGenerationBackendXML; + WriteLn(xmloutput,' '); WriteLn(xmloutput,''); Close(xmloutput); end -- cgit v1.2.1