Skip to content
/ orbc Public

A compiler written in c++ with LLVM for the Orb language

Notifications You must be signed in to change notification settings

OrbLang/orbc

Repository files navigation

Orbc - A compiler for Orb

⚠️ !! WARNING !! ⚠️

This project isn't done yet, and is currently in a non-functioning state. We are actively working on it though.

Usage

To compile a simple project, supply the orbc compiler with all your files containing orb source code.

$ orbc ponder.orb foo.orb bar.orb

This will output an executable called ponder, copying the first source file filename. To specify the name of the output, supply the -o flag, followed by the name of the output.

$ orbc ponder.orb foo.orb bar.orb -o baz

Here the output will be named baz

Installation

To install orbc, you will need to clone the repository and compile it yourself. We use the meson buildsystem, which you will need to have installed on your system.

1. Clone the repo:

$ git clone https://github.com/OrbLang/orbc
$ cd orbc

2. Specify what c++ compiler and linker to use:

Here llvm's clang and lld are used

$  export CC=clang; export CXX=clang++; export CC_LD=lld; export CXX_LD=lld

this can also be done, without exporting, in the next step: CC=clang CXX=clang++ meson setup ...

3. Setup a build directory:

You can change the prefix to where you want orbc to be installed. If left out it will default to /usr/local and C:\ on Windows. You can also change the buildtype if desired, for example to --buildtype debug or --buildtype debugoptimized

$ meson setup builddir --prefix=$PWD/install

(If you wish for orbc to not output any color, the flag -Dno-color=true can be used)

4. Compile orbc:

$ meson compile -C builddir

Now the orbc executable should be in ./builddir/orbc

5. Optionally install orbc and dependencies on your system:

$ sudo meson install -C builddir

Now orbc will end up in a bin folder at the prefix specified in step 3. (If no prefix orbc will be at /usr/local/bin)

About

A compiler written in c++ with LLVM for the Orb language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published