summaryrefslogtreecommitdiff
path: root/MLKReadEvalPrintLoop.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-23 18:19:32 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-23 18:19:32 +0200
commit6f71f22d665d7d629fd34f8ec3ba21ef84dda31a (patch)
tree4cd5a42567e78030ae6f0e31de1dc7be4ff87ede /MLKReadEvalPrintLoop.m
parentad05662ae05336aa5db20f9d34d5c1d5bba9d6c2 (diff)
Factor the LLVM compiler out into its own library.
Diffstat (limited to 'MLKReadEvalPrintLoop.m')
-rw-r--r--MLKReadEvalPrintLoop.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m
index fc0d8ef..53943bc 100644
--- a/MLKReadEvalPrintLoop.m
+++ b/MLKReadEvalPrintLoop.m
@@ -26,6 +26,11 @@
#import "runtime-compatibility.h"
#import "util.h"
+#if USE_LLVM
+#import "MLKLLVMCompiler.h"
+#import "MLKLexicalContext-MLKLLVMCompilation.h"
+#endif
+
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSException.h>
#import <Foundation/NSNull.h>
@@ -76,6 +81,12 @@ static const char *prompt (EditLine *e) {
BOOL success;
NSAutoreleasePool *pool;
+#ifdef USE_LLVM
+ // We do this in order to prevent ld from “optimising” MLKLLVMCompiler
+ // away. GNU ld apparently sucks at dynamic languages.
+ [MLKLLVMCompiler class];
+#endif
+
editline = el_init (_argv[0], stdin, stdout, stderr);
el_set (editline, EL_PROMPT, &prompt);
el_set (editline, EL_EDITOR, "emacs");