mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 14:29:13 +02:00
LLVM: list supported LLVM/Xcode versions
Use the -i or -il command line parameter
This commit is contained in:
parent
591c1b0177
commit
3ef0db2404
@ -3845,6 +3845,9 @@ Supported Whole Program Optimizations:
|
|||||||
Code Generation Backend
|
Code Generation Backend
|
||||||
$CODEGENERATIONBACKEND
|
$CODEGENERATIONBACKEND
|
||||||
|
|
||||||
|
Supported LLVM/Xcode versions (only available with LLVM Code Generation Backend)
|
||||||
|
$LLVMVERSIONS
|
||||||
|
|
||||||
Supported Microcontroller types:$\n $CONTROLLERTYPES$\n
|
Supported Microcontroller types:$\n $CONTROLLERTYPES$\n
|
||||||
This program comes under the GNU General Public Licence
|
This program comes under the GNU General Public Licence
|
||||||
For more information read COPYING.v2
|
For more information read COPYING.v2
|
||||||
@ -4092,6 +4095,7 @@ A*2CV<x>_Set section threadvar model to <x>
|
|||||||
**2iD_Return compiler date
|
**2iD_Return compiler date
|
||||||
**2if_Return list of supported FPU instruction sets
|
**2if_Return list of supported FPU instruction sets
|
||||||
**2ii_Return list of supported inline assembler modes
|
**2ii_Return list of supported inline assembler modes
|
||||||
|
L*2il_Return list of supported LLVM/Xcode versions by the LLVM backend
|
||||||
**2im_Return list of supported modeswitches
|
**2im_Return list of supported modeswitches
|
||||||
**2io_Return list of supported optimizations
|
**2io_Return list of supported optimizations
|
||||||
**2ir_Return list of recognized compiler and RTL features
|
**2ir_Return list of recognized compiler and RTL features
|
||||||
|
@ -232,6 +232,7 @@ const
|
|||||||
FeatureListPlaceholder = '$FEATURELIST';
|
FeatureListPlaceholder = '$FEATURELIST';
|
||||||
ModeSwitchListPlaceholder = '$MODESWITCHES';
|
ModeSwitchListPlaceholder = '$MODESWITCHES';
|
||||||
CodeGenerationBackendPlaceholder = '$CODEGENERATIONBACKEND';
|
CodeGenerationBackendPlaceholder = '$CODEGENERATIONBACKEND';
|
||||||
|
LLVMVersionPlaceholder = '$LLVMVERSIONS';
|
||||||
|
|
||||||
procedure SplitLine (var OrigString: TCmdStr; const Placeholder: TCmdStr;
|
procedure SplitLine (var OrigString: TCmdStr; const Placeholder: TCmdStr;
|
||||||
out RemainderString: TCmdStr);
|
out RemainderString: TCmdStr);
|
||||||
@ -730,6 +731,51 @@ const
|
|||||||
WriteLn(xmloutput,' <codegeneratorbackend>',cgbackend2str[cgbackend],'</codegeneratorbackend>');
|
WriteLn(xmloutput,' <codegeneratorbackend>',cgbackend2str[cgbackend],'</codegeneratorbackend>');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ListLLVMVersions (OrigString: TCmdStr);
|
||||||
|
{$ifdef LLVM}
|
||||||
|
var
|
||||||
|
llvmversion : tllvmversion;
|
||||||
|
{$endif LLVM}
|
||||||
|
begin
|
||||||
|
{$ifdef LLVM}
|
||||||
|
SplitLine (OrigString, LLVMVersionPlaceholder, HS3);
|
||||||
|
for llvmversion:=low(llvmversion) to high(llvmversion) do
|
||||||
|
begin
|
||||||
|
hs1:=llvmversionstr[llvmversion];
|
||||||
|
if hs1<>'' then
|
||||||
|
begin
|
||||||
|
if OrigString = '' then
|
||||||
|
Comment (V_Normal, hs1)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
hs:=OrigString;
|
||||||
|
Replace(hs,LLVMVersionPlaceholder,hs1);
|
||||||
|
Comment(V_Normal,hs);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{$else LLVM}
|
||||||
|
Comment (V_Normal, '')
|
||||||
|
{$endif LLVM}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ListLLVMVersionsXML;
|
||||||
|
{$ifdef LLVM}
|
||||||
|
var
|
||||||
|
llvmversion : tllvmversion;
|
||||||
|
{$endif LLVM}
|
||||||
|
begin
|
||||||
|
{$ifdef LLVM}
|
||||||
|
WriteLn(xmloutput,' <llvmversions>');
|
||||||
|
for llvmversion:=Low(tllvmversion) to High(tllvmversion) do
|
||||||
|
if llvmversionstr[llvmversion]<>'' then
|
||||||
|
WriteLn(xmloutput,' <llvmversion name="',llvmversionstr[llvmversion],'"/>');
|
||||||
|
WriteLn(xmloutput,' </llvmversions>');
|
||||||
|
{$endif LLVM}
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if More = '' then
|
if More = '' then
|
||||||
begin
|
begin
|
||||||
@ -761,6 +807,8 @@ begin
|
|||||||
ListFeatures (S)
|
ListFeatures (S)
|
||||||
else if pos(CodeGenerationBackendPlaceholder,s)>0 then
|
else if pos(CodeGenerationBackendPlaceholder,s)>0 then
|
||||||
ListCodeGenerationBackend (S)
|
ListCodeGenerationBackend (S)
|
||||||
|
else if pos(LLVMVersionPlaceholder,s)>0 then
|
||||||
|
ListLLVMVersions (s)
|
||||||
else
|
else
|
||||||
Comment(V_Normal,s);
|
Comment(V_Normal,s);
|
||||||
end;
|
end;
|
||||||
@ -783,6 +831,7 @@ begin
|
|||||||
ListControllerTypesXML;
|
ListControllerTypesXML;
|
||||||
ListFeaturesXML;
|
ListFeaturesXML;
|
||||||
ListCodeGenerationBackendXML;
|
ListCodeGenerationBackendXML;
|
||||||
|
ListLLVMVersionsXML;
|
||||||
WriteLn(xmloutput,' </info>');
|
WriteLn(xmloutput,' </info>');
|
||||||
WriteLn(xmloutput,'</fpcoutput>');
|
WriteLn(xmloutput,'</fpcoutput>');
|
||||||
Close(xmloutput);
|
Close(xmloutput);
|
||||||
@ -800,6 +849,9 @@ begin
|
|||||||
'c': ListCPUInstructionSets ('');
|
'c': ListCPUInstructionSets ('');
|
||||||
'f': ListFPUInstructionSets ('');
|
'f': ListFPUInstructionSets ('');
|
||||||
'i': ListAsmModes ('');
|
'i': ListAsmModes ('');
|
||||||
|
{$ifdef LLVM}
|
||||||
|
'l': ListLLVMVersions ('');
|
||||||
|
{$endif LLVM}
|
||||||
'm': ListModeswitches ('');
|
'm': ListModeswitches ('');
|
||||||
'o': ListOptimizations ('');
|
'o': ListOptimizations ('');
|
||||||
'r': ListFeatures ('');
|
'r': ListFeatures ('');
|
||||||
@ -2287,7 +2339,7 @@ begin
|
|||||||
'i' :
|
'i' :
|
||||||
begin
|
begin
|
||||||
if (More='') or
|
if (More='') or
|
||||||
(More [1] in ['a', 'b', 'c', 'f', 'i', 'm', 'o', 'r', 't', 'u', 'w', 'x']) then
|
(More [1] in ['a', 'b', 'c', 'f', 'i', {$ifdef LLVM}'l',{$endif} 'm', 'o', 'r', 't', 'u', 'w', 'x']) then
|
||||||
WriteInfo (More)
|
WriteInfo (More)
|
||||||
else
|
else
|
||||||
QuickInfo:=QuickInfo+More;
|
QuickInfo:=QuickInfo+More;
|
||||||
|
Loading…
Reference in New Issue
Block a user