summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile5
-rw-r--r--MLKRoot.m3
2 files changed, 5 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index e2ea521..7fb8754 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -56,7 +56,6 @@ ToiletKit_OBJC_FILES = functions.m globals.m MLKArray.m \
MLKForeignProcedure.m MLKForm.m MLKInteger.m \
MLKInterpretedClosure.m MLKInterpreter.m \
MLKLexicalContext.m \
- MLKLexicalContext-MLKLLVMCompilation.m \
MLKLexicalEnvironment.m MLKNumber.m MLKPackage.m \
MLKParenReader.m MLKQuoteReader.m MLKRatio.m \
MLKReader.m MLKReadtable.m MLKReaderError.m \
@@ -74,8 +73,10 @@ ToiletKit_LDFLAGS = -lgmp -lffi -ldl
USE_LLVM := YES
ifeq ($(USE_LLVM),YES)
ADDITIONAL_OBJCCFLAGS = $(ADDITIONAL_OBJCFLAGS)
+ToiletKit_OBJC_FILES += MLKLexicalContext-MLKLLVMCompilation.m
ToiletKit_OBJCC_FILES = MLKLLVMCompiler.mm
-ToiletKit_OBJCCFLAGS = `llvm-config --cxxflags` $(ToiletKit_OBJCFLAGS)
+ToiletKit_OBJCFLAGS = -DUSE_LLVM
+ToiletKit_OBJCCFLAGS = -DUSE_LLVM `llvm-config --cxxflags` $(ToiletKit_OBJCFLAGS)
ToiletKit_LDFLAGS += `llvm-config --ldflags` `llvm-config --libs backend engine linker codegen transformutils scalaropts analysis ipo`
endif
diff --git a/MLKRoot.m b/MLKRoot.m
index a003912..b051dd3 100644
--- a/MLKRoot.m
+++ b/MLKRoot.m
@@ -704,7 +704,7 @@ as provided by method %@ of object %@",
with:nil]]);
}
-
+#ifdef USE_LLVM
+(NSArray *) compile:(NSArray *)args
{
NSLog (@"Compiling lambda form.");
@@ -714,4 +714,5 @@ as provided by method %@ of object %@",
NSLog (@"Compiled: %@", thing);
RETURN_VALUE (thing);
}
+#endif
@end