summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLLVMCompiler.mm7
-rw-r--r--Toilet Lisp.xcodeproj/project.pbxproj24
2 files changed, 28 insertions, 3 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 8cb60e7..10dd1b7 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -133,7 +133,7 @@ static Constant
InitializeNativeTarget();
std::string error;
- //execution_engine = ExecutionEngine::create (module, true, &error);
+ //execution_engine = ExecutionEngine::create (module, true, &error);
execution_engine = ExecutionEngine::create (module, false, &error);
assert(execution_engine);
@@ -574,8 +574,9 @@ static Constant
if ((built_in_name = toilet_built_in_function_name(_head)))
{
//vector <const Type *> argtypes (2, VoidPointerTy);
- vector <const Type *> argtypes;
- FunctionType *ftype = FunctionType::get (VoidPointerTy, argtypes, true);
+ vector <const Type *> argtypes (2 + [_argumentForms count] + 1, VoidPointerTy);
+ argtypes[1] = PointerPointerTy;
+ FunctionType *ftype = FunctionType::get (VoidPointerTy, argtypes, false);
functionPtr =
module->getOrInsertFunction (built_in_name, ftype);
closureDataPtr = ConstantPointerNull::get (VoidPointerTy);
diff --git a/Toilet Lisp.xcodeproj/project.pbxproj b/Toilet Lisp.xcodeproj/project.pbxproj
index dae7b41..122feac 100644
--- a/Toilet Lisp.xcodeproj/project.pbxproj
+++ b/Toilet Lisp.xcodeproj/project.pbxproj
@@ -1550,6 +1550,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1593,6 +1594,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1637,6 +1639,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1682,6 +1685,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1725,6 +1729,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1769,6 +1774,7 @@
"-g",
"-fno-common",
"-DUSE_LLVM",
+ "-DHAVE_FFI_CALL",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
@@ -1810,6 +1816,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -1849,6 +1857,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -1889,6 +1899,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -1931,6 +1943,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -1974,6 +1988,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2018,6 +2034,8 @@
MACOSX_DEPLOYMENT_TARGET = "";
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-L/opt/homebrew/lib",
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2102,6 +2120,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2245,6 +2264,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2441,6 +2461,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2523,6 +2544,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2773,6 +2795,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",
@@ -2853,6 +2876,7 @@
);
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
+ "-lffi",
"-framework",
Foundation,
"-lgmp",