From 06878ba887081ba7b5be7194c076de79a6b46568 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 28 Aug 2008 09:50:19 +0200 Subject: GUI: Add a hack preventing the LLVM compiler from being optimised out by ld. --- ToiletLisp_main.m | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ToiletLisp_main.m') diff --git a/ToiletLisp_main.m b/ToiletLisp_main.m index 8bc60d8..33f81da 100644 --- a/ToiletLisp_main.m +++ b/ToiletLisp_main.m @@ -16,10 +16,21 @@ * along with this program. If not, see . */ +#if USE_LLVM +#import "MLKLLVMCompiler.h" +#import "MLKLexicalContext-MLKLLVMCompilation.h" +#endif + #import int main (int argc, const char *argv[]) { +#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 + return NSApplicationMain(argc, argv); } -- cgit v1.2.3