Giter VIP home page Giter VIP logo

chambart / flambda-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocaml-flambda/flambda-backend

0.0 1.0 0.0 124.68 MB

The Flambda backend project for OCaml

Makefile 0.74% M4 0.44% Shell 2.17% OCaml 87.03% Standard ML 0.14% M 0.38% Mathematica 0.06% TeX 0.18% CSS 0.01% HTML 0.01% C 7.81% Assembly 0.76% Awk 0.05% Forth 0.01% C# 0.01% Batchfile 0.03% Perl 0.01% Common Lisp 0.01% JavaScript 0.06% SCSS 0.12%

flambda-backend's Introduction

The Flambda backend project for OCaml.

One-time setup for dev work or installation

Only currently tested on Linux/x86-64 and macOS/x86-64.

One-time setup:

$ opam switch 4.11.1  # or "opam switch create 4.11.1" if you haven't got that switch already
$ eval $(opam env)
$ git clone https://github.com/ocaml-flambda/dune
$ cd dune  # We'll refer to this "dune" directory below as $DUNE_DIR
$ git checkout origin/special_dune
$ make release

You probably then want to fork the ocaml-flambda/flambda-backend repo to your own Github org.

Branching and configuring

Use normal commands to make a branch from the main upstream branch (currently 4.11), e.g.:

$ git clone https://github.com/ocaml-flambda/flambda-backend
$ cd flambda-backend
$ git checkout -b myfeature origin/4.11

The Flambda backend tree has to be configured before building. The configure script is not checked in; you have to run autoconf. For example:

$ autoconf
$ ./configure --prefix=/path/to/install/dir --enable-middle-end=closure --with-dune=$DUNE_DIR/dune.exe

You can also specify --enable-middle-end=flambda.

Building and installing

To build and install the Flambda backend, which produces a compiler installation directory whose layout is compatible with upstream, run:

$ make  # or e.g. make -j16
$ make install

Running tests

Prior to make install you can do:

  • make runtest to run the Flambda backend tests (which use dune);
  • make runtest-upstream to run the upstream testsuite. The upstream testsuite runs much faster if you install GNU parallel. This is likely already present on Linux machines. On macOS, install Homebrew, then brew install parallel.
  • make compare to run the comparison script that finds differences between the upstream and Flambda backend install trees. This script currently only runs on Linux, although it shouldn't be hard to port to macOS, especially if using GNU binutils. It is recommended to install the Jane Street patdiff executable before running make compare.

There is also a make ci target (best run as e.g. make -j16 ci) which does a full build and test run. It does not currently run make compare as some spurious failures have been observed on the Github systems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.