Building Instructions


Quick Build

~$ git clone
~$ cd anydsl
~/anydsl$ cp
~/anydsl$ ./

You may also want to fine-tune In particular, if you don’t have a GitHub account with a working SSH key, set : ${HTTPS:=true}. This will clone all repositories via https.

Verify your Installation

As pointed out by the build script, ensure that impala and your build of clang is in your path:

~/anydsl$ which impala
~/anydsl$ which clang

Try out hello world

Invoking impala --help shows available options. As impala currently does not ship with a standard library, impala emits LLVM files. We link via clang small C-wrappers to communicate with the outside world and to build the final executable. So let’s compile hello_world.impala:

~/anydsl$ cd impala/test
~/anydsl/impala/test$ clang infrastructure/lib.c -O2 -c                 # compile wrappers
~/anydsl/impala/test$ impala --emit-llvm -O2 codegen/hello_world.impala # produce hello_world.bc
# link wrapper and hello_world.ll to executable
~/anydsl/impala/test$ clang hello_world.ll lib.o       
~/anydsl/impala/test$ ./a.out