Just another Lisp https://serene-lang.org
Go to file
Sameer Rahmani 65b6aa4020 Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
bin Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
docs Add the bare min pass to convert slir to std dialect 2021-06-11 22:06:44 +01:00
include Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
resources Remove the goimpl and move it to a separate branch 2021-04-13 13:47:13 +01:00
scripts Remove the goimpl and move it to a separate branch 2021-04-13 13:47:13 +01:00
src Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
.clang-format Commit the missing files related to coding style 2020-07-23 21:47:44 +01:00
.gitignore Implement classof in derived expressions 2021-03-31 19:37:32 +01:00
.ignore_sanitize Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
CMakeLists.txt Add SLIR skeleton to start the generator 2021-06-08 22:01:08 +01:00
LICENSE Merge branch 'mlir' 2021-04-13 12:03:27 +01:00
README.org Update the todo list in dev.org 2021-04-30 16:07:28 +01:00
builder Add the IR generation facilities to Namespace and Expression 2021-06-13 22:40:58 +01:00
dev.org Update the todo list in dev.org 2021-04-30 16:07:28 +01:00

README.org

Serene lang

Setup development environment

Setup the githook and install dependencies using the following commands:

./builder setup

Dependencies

You would need the following dependencies to start get started with Serene development

  • LLVM ( LLVM Instructions coming up.)
  • cmake
  • ninja
  • doxygen (If you want to build the docs as well)
  • Valgrind
  • CCache (If you want faster builds specially with the LLVM)

LLVM Installation

MLIR is a part of the LLVM project and in order to build it we need to build the LLVM itself as well. Here is a quick guide to build the latest version of the LLVM and MLIR.

  ## YES we're using the development version of MLIR
  git clone https://github.com/llvm/llvm-project.git

  mkdir llvm-project/build
  cd llvm-project/build

  cmake -G Ninja ../llvm \
        -DCMAKE_INSTALL_PREFIX=/your/target/path \
        -DLLVM_PARALLEL_COMPILE_JOBS=7 \
        -DLLVM_PARALLEL_LINK_JOBS=1 \
        -DLLVM_BUILD_EXAMPLES=ON \
        -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_ASSERTIONS=ON \
        -DLLVM_CCACHE_BUILD=ON \
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
        -DLLVM_ENABLE_PROJECTS='clang;lldb;lld;mlir;clang-tools-extra;compiler-rt' \
        -DCMAKE_C_COMPILER=clang \
        -DCMAKE_CXX_COMPILER=clang++ \
        -DLLVM_ENABLE_LLD=ON

  cmake --build .

  cmake --build . --target check-mlir

  cmake -DCMAKE_INSTALL_PREFIX=/your/target/location -P cmake_install.cmake

You need to have clang and lld installed to compile the LLVM with the above command. Also if you are not using ccache just remove the option related to it from the above command.

Emacs

If you're using Emacs as your development environment just install clangd and lsp.

How to build

In order to build for development (Debug mode) just use ./builder build to setup the build and build the project once and then you can just use ./builder compile to build the changed files only.

Check out the builder script for more subcommands and details.

Cheatsheets

Get Help

If you need help or you just want to hangout, you can find us at: