-
Notifications
You must be signed in to change notification settings - Fork 3
Linux
This page provides a tutorial on how to build the LLVM frontend for the Oberon programming language on Linux. Since this project uses CMake to manage its build process, it is recommended to use the CLion IDE under Linux, which uses CMakeLists.txt
natively as its project model. Furthermore, the GNU Compiler Collection (GCC) is assumed to be used to compile the frontend.
[[TOC]]
Before the Oberon LLVM frontend can be built, the Boost libraries (algorithm, convert, filesystem, and program-options components) and the LLVM Compiler Infrastructure (core libraries and tools) need to be installed. It is recommended to use the Advanced Package Tool (APT) to accomplish this. Note that this tutorial assumes that standard build tools such as git
, make
, and cmake
are available on the system used to build the frontend. Otherwise, these tools can also be installed using APT.
sudo apt install libboost-all-dev
sudo apt install llvm-dev
The LLVM frontend for the Oberon programming language on Linux can be built from the command line or using an IDE that supports CMake projects such as CLion.
Begin by cloning the project repository from GitLab.
git clone https://gitlab.inf.uni-konstanz.de/michael.grossniklaus/oberon-lang.git
-
Navigate to the
oberon-lang
directory and create a newbuild
directory. Then, navigate to the newly createdbuild
directory.cd oberon-lang
mkdir build
cd build
-
Invoke CMake to set up the build toolchain and generate the required build files.
cmake .. -G "Unix Makefiles"
-
As a result, CMake will generate
Makefile
s that can be used to build the frontend.make
After the build successfully terminates, the oberon-lang
binary can be found in the oberon-lang/build/src
subdirectory.
-
Start CLion and select
Open
in the welcome dialog. -
Navigate to the
oberon-lang
folder to which you cloned the project repository and clickOpen
. -
Once the project is open, build it using the
Build
→Build Project
menu.
Once the build successfully terminates, the oberon-lang
executable can be found in the oberon-lang/cmake-build-debug/src
or oberon-lang/cmake-build-release/src
subdirectory.
Building the Frontend
Using the Compiler
- Apple Clang Toolchain
- GCC Toolchain
- Microsoft MSVC Toolchain
- Just-in-Time Compilation
- Embedded Devices
Oberon Compatibility
Miscellaneous