diff options
author | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-28 09:50:19 +0200 |
---|---|---|
committer | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-28 09:50:19 +0200 |
commit | 06878ba887081ba7b5be7194c076de79a6b46568 (patch) | |
tree | 93a4c823d1c81d655426c7ac0c519e2d2331c7f1 | |
parent | c9419e52bf83ea500e3535efaa5e7d52ce041e47 (diff) |
GUI: Add a hack preventing the LLVM compiler from being optimised out by ld.
-rw-r--r-- | ToiletLisp_main.m | 11 |
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); } |