Installation

Prebuilt packages are currently available only for Windows, you can download it here.

Just unzip the downloaded package, the compiler executable blc.exe can be found in the bin folder, use following snippet to add the bin directory to the system PATH.

In Powershell:

[Environment]::SetEnvironmentVariable(
   "Path",
   [Environment]::GetEnvironmentVariable("Path", "User") + ";path\to\bl\bin",
   "User"
)

Installation From Source Code

Download the source from here.

Supported targets:

  • x86_64-pc-windows-msvc
  • x86_64-pc-linux-gnu
  • x86_64-apple-darwin
  • arm64-apple-darwin (experimental)

Windows

  • Install CMake
  • Install Visual Studio 2022 or MS Build Tools with C/C++ support
  • Download and compile
cd path\to\unzipped\directory
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
  • Add bin directory to the system PATH.

In Powershell:

[Environment]::SetEnvironmentVariable(
   "Path",
   [Environment]::GetEnvironmentVariable("Path", "User") + ";path\to\bl\bin",
   "User"
)

Linux (Ubuntu)

  • Install needed tools
apt-get install cmake build-essential llvm-16-dev
  • Download and compile
cd path/to/unzipped/directory
mkdir build
cd build
cmake ..
make
  • Add bin directory to the system PATH.
export PATH=$PATH:/path/to/your/bl/bin

macOS

  • Install command line tools xcode-select --install.
  • Install other needed tools using brew brew install cmake llvm@16.
  • Download and compile
cd path/to/unzipped/directory
mkdir build
cd build
cmake ..
make
  • Add bin directory to the system PATH.
export PATH=$PATH:/path/to/your/bl/bin

Warning

ARM support is experimental.