mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 23:28:28 +02:00
* support building the IDE with the LLVM code generator
git-svn-id: trunk@44791 -
This commit is contained in:
parent
218ca87a3f
commit
723430ac34
@ -69,6 +69,9 @@ FPMAKE_OPT+=-bu
|
||||
ifndef BUILDFULLNATIVE
|
||||
FPMAKE_OPT+=-scp
|
||||
endif
|
||||
ifdef LLVM
|
||||
FPMAKE_OPT+=--LLVM=1
|
||||
endif
|
||||
.NOTPARALLEL:
|
||||
|
||||
fpmkunit_clean_bootstrap:
|
||||
|
@ -90,6 +90,10 @@ ifdef PPC_TARGET
|
||||
FPMAKE_OPT+=--CompilerTarget=$(PPC_TARGET)
|
||||
endif
|
||||
|
||||
ifdef LLVM
|
||||
FPMAKE_OPT+=--LLVM=1
|
||||
endif
|
||||
|
||||
.NOTPARALLEL:
|
||||
|
||||
PPC_TARGETS=i386 m68k powerpc sparc arm x86_64 powerpc64 mips mipsel avr jvm i8086 aarch64 sparc64
|
||||
|
@ -148,6 +148,7 @@ begin
|
||||
AddCustomFpmakeCommandlineOption('GDBMI','If value=1 or ''Y'', builds IDE with GDB/MI support (no need for LibGDB)');
|
||||
AddCustomFpmakeCommandlineOption('NoIDE','If value=1 or ''Y'', the IDE will be skipped');
|
||||
AddCustomFpmakeCommandlineOption('IDE','If value=1 or ''Y'', the IDE will be build for each target');
|
||||
AddCustomFpmakeCommandlineOption('LLVM','If value=1 or ''Y'', the Compiler codegenerator will use LLVM');
|
||||
end;
|
||||
|
||||
procedure add_ide(const ADirectory: string);
|
||||
@ -158,6 +159,7 @@ Var
|
||||
CompilerTarget : TCpu;
|
||||
CompilerDir,
|
||||
s: string;
|
||||
llvm: boolean;
|
||||
|
||||
begin
|
||||
With Installer do
|
||||
@ -185,6 +187,11 @@ begin
|
||||
CompilerTarget:=StringToCPU(s)
|
||||
else
|
||||
CompilerTarget:=Defaults.CPU;
|
||||
s:=GetCustomFpmakeCommandlineOptionValue('LLVM');
|
||||
if (s='1') or (s='Y') then
|
||||
llvm:=true
|
||||
else
|
||||
llvm:=false;
|
||||
{ Only try to build natively }
|
||||
{ or for cross-compile if the resulting executable
|
||||
does not depend on C libs }
|
||||
@ -261,6 +268,12 @@ begin
|
||||
if CompilerTarget = mipsel then
|
||||
P.Options.Add('-Fu'+CompilerDir+'/mips');
|
||||
|
||||
if llvm then
|
||||
begin
|
||||
P.Options.Add('-Fu'+CompilerDir+'/llvm');
|
||||
P.Options.Add('-Fi'+CompilerDir+'/llvm');
|
||||
end;
|
||||
|
||||
{ powerpc64-aix compiled IDE needs -CTsmalltoc option }
|
||||
if (Defaults.OS=aix) and (Defaults.CPU=powerpc64) then
|
||||
P.Options.Add('-CTsmalltoc');
|
||||
|
Loading…
Reference in New Issue
Block a user