Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.28 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.28 KB

Kaleidoscope

This is an implementation of (some of) the language from the LLVM Kaleidoscope tutorial.

The project itself does its parsing with KaleidoscopeLang and codegen using LLVM.swift.

Getting it running

  1. Build LLVM (currently tested with 3.6.2). Homebrew is the easiest way to do this: brew install llvm

  2. Clone the repository and its submodules

  3. In Carthage/Checkouts/LLVM/LLVM.xcconfig, set LLVM_PREFIX to be the prefix used when building LLVM. For homebrew this will typically be /usr/local/Cellar/llvm/3.6.2, for you it may be /usr/local or similar depending on your setup.

  4. Open Kaleidoscope.xcworkspace and run it!

Limitations

  • There’s currently no way to run the resulting LLVM assembly because there’s no way to represent main. See #4.

  • There’s no JIT like the Kaleidoscope tutorial has.

  • This currently only implements up to Chapter 4 of the Kaleidoscope tutorial