-
Notifications
You must be signed in to change notification settings - Fork 0
Clone and Build
git clone --recursive --depth 1 https://github.com/dparo/dpcc
cd dpcc
The most notable dependencies for building the compiler are
-
Unix/Posix
environment -
GCC
orCLANG
compiler -
CMake>=3.11
build system Flex>=2.6
Bison>=3.6
Your Linux distribution should provide CMake>=3.11
. CMake 3.11
was released on November 2018. If you use a relatively updated Linux distribution there shouldn't be a problem.
On Linux
, the build process automatically downloads, extracts and build Flex
and Bison
dependencies with the correct required version.
Unfortunately Flex
requires Bison
to be installed in order to perform the bootstrapping. Thus Linux users should still install the associated system-wide dependencies.
-
Getting the dependencies
sudo apt install gcc make cmake libtool flex bison
sudo dnf install gcc make cmake libtool flex bison
sudo pacman -S gcc make cmake libtool flex bison
mkdir -p build
cd build
cmake ../
cmake --build ./
It's assumed that the user has a workinjg MacOs development environment with a C compiler installed. It is also assumet that Brew is setup correctly on the machine.
brew install cmake flex bison
In order to build the dpcc
compiler we need to use the latest version of Flex
and Bison
which are provided through brew.
In order to build the compiler type:
mkdir -p build
cd build
env PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH" cmake ../
env PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH" cmake --build ./