@@ -242,6 +242,11 @@ Flag NoEffects
242242 Description: Do not build the effects package
243243 Default: False
244244
245+Flag LLVM
246+ Description: Build the LLVM backend
247+ Default: True
248+ manual: True
249+
245250Executable idris
246251 Main-is: Main.hs
247252 hs-source-dirs: src
@@ -267,7 +272,7 @@ Executable idris
267272 IRTS.CodegenC, IRTS.Defunctionalise, IRTS.Inliner,
268273 IRTS.Compiler, IRTS.CodegenJava, IRTS.Java.ASTBuilding,
269274 IRTS.Java.JTypes, IRTS.Java.Mangling, IRTS.BCImp,
270− IRTS.CodegenJavaScript, IRTS.CodegenLLVM,
275+ IRTS.CodegenJavaScript,
271276 IRTS.CodegenCommon, IRTS.DumpBC
272277
273278 Paths_idris
@@ -276,7 +281,7 @@ Executable idris
276281 haskeline>=0.7, split, directory,
277282 containers, process, transformers, filepath,
278283 directory, binary, bytestring, text, pretty,
279− language-java>=0.2.2, libffi, llvm-general>=3.3.4.1 && <3.3.5,
284+ language-java>=0.2.2, libffi,
280285 vector, vector-binary-instances
281286
282287 Extensions: MultiParamTypeClasses, FunctionalDependencies,
@@ -292,3 +297,9 @@ Executable idris
292297 if os(windows)
293298 cpp-options: -DWINDOWS
294299 build-depends: Win32
300+ if flag(LLVM)
301+ other-modules: IRTS.CodegenLLVM
302+ cpp-options: -DIDRIS_LLVM
303+ build-depends: llvm-general>=3.3.4.1 && <3.3.5
304+ else
305+ other-modules: Util.LLVMStubs