summaryrefslogtreecommitdiff
path: root/ToiletLisp_main.m
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-08-28 09:50:19 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-08-28 09:50:19 +0200
commit06878ba887081ba7b5be7194c076de79a6b46568 (patch)
tree93a4c823d1c81d655426c7ac0c519e2d2331c7f1 /ToiletLisp_main.m
parentc9419e52bf83ea500e3535efaa5e7d52ce041e47 (diff)
GUI: Add a hack preventing the LLVM compiler from being optimised out by ld.
Diffstat (limited to 'ToiletLisp_main.m')
-rw-r--r--ToiletLisp_main.m11
1 files changed, 11 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#if USE_LLVM
+#import "MLKLLVMCompiler.h"
+#import "MLKLexicalContext-MLKLLVMCompilation.h"
+#endif
+
#import <AppKit/NSApplication.h>
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);
}