From 6f71f22d665d7d629fd34f8ec3ba21ef84dda31a Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 23 Aug 2008 18:19:32 +0200 Subject: Factor the LLVM compiler out into its own library. --- MLKReadEvalPrintLoop.m | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'MLKReadEvalPrintLoop.m') 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 #import #import @@ -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"); -- cgit v1.2.3