Skip to content
Bruce Mitchener edited this page May 14, 2013 · 1 revision

Our runtime library needs some love.

Merging Runtimes

We currently have the C run-time in sources/dfmc/c-run-time/ and the HARP run-time in sources/lib/run-time/.

  • The C run-time has better threading primitive implementations.
  • The HARP run-time has better allocator / GC integration.
  • The HARP run-time has signal handlers.

Soon, we will be needing a third run-time for the LLVM compiler backend.

Ideally, we will be able to merge the relevant portions of the C run-time into the other run-time and switch over to using the merged run-time sources.

Despite the fact that the sources are merged, we will build 3 different run-time archive libraries, one for each native compiler back-end. This is because some things are implemented in C for the C backend, while other things are handled by HARP or LLVM.

The first steps are probably:

  • Copy the C run-time's thread primitives over to the HARP back-end and make sure they work.
  • Bring over parts of sources/dfmc/c-run-time/run-time.c over to the HARP run-time, factor our common or duplicated code and get things to compile.

Installing Multiple Runtime Libraries

In addition to merging the run-times, we want to be able to build and install for multiple platforms at once. For example, on Mac OS X, you would want the run-times for x86-darwin, x86_64-darwin, arm-darwin to all be present for both C and LLVM compiler backends.

Clone this wiki locally