Ver Fonte

* support building the LLVM compiler for Darwin/x86_64 and Linux/x86_64 by
specifyng LLVM=1 to make (does not yet work for the top-level makefile
on Linux because of the fpmake-based building of the IDE)

git-svn-id: trunk@35140 -

Jonas Maebe há 8 anos atrás
pai
commit
e35f83ba94
2 ficheiros alterados com 22 adições e 0 exclusões
  1. 9 0
      compiler/Makefile
  2. 13 0
      compiler/Makefile.fpc

+ 9 - 0
compiler/Makefile

@@ -496,6 +496,15 @@ endif
 endif
 endif
 override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
+ifdef LLVM
+ifeq ($(findstring $(PPC_TARGET),x86_64),)
+$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
+endif
+ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux),)
+$(error The $(PPC_TARGET) target OS is not (yet) support by the FPC/LLVM code generator)
+endif
+override LOCALOPT+=-dllvm -Fullvm
+endif
 ifeq ($(PPC_TARGET),i386)
 override LOCALOPT+=-Fux86
 endif

+ 13 - 0
compiler/Makefile.fpc

@@ -241,6 +241,19 @@ endif
 # set correct defines (-d$(CPU_TARGET) is automatically added in makefile.fpc)
 override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
 
+#include LLVM define/directory if requested
+ifdef LLVM
+ifeq ($(findstring $(PPC_TARGET),x86_64),)
+$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
+endif
+
+ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux),)
+$(error The $(PPC_TARGET) target OS is not (yet) support by the FPC/LLVM code generator)
+endif
+
+override LOCALOPT+=-dllvm -Fullvm
+endif
+
 # i386 specific
 ifeq ($(PPC_TARGET),i386)
 override LOCALOPT+=-Fux86