[mini] factor out interp into a library (#6419)
commit711a02e465a83e426ca6775205834e639fe880a1
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 9 Jan 2018 09:05:29 +0000 (9 10:05 +0100)
committerLudovic Henry <luhenry@microsoft.com>
Tue, 9 Jan 2018 09:05:29 +0000 (9 10:05 +0100)
tree4bccc3fe2af756ea9d85926b87fb08c04651d711
parent57a2cce4b1f9783b25d59335e755b3c24fc25af9
[mini] factor out interp into a library (#6419)

* [mini] factor out interp into a library

It enables us to ship the interpreter as an add-on to the runtime.
Embedder can statically link it into their application on demand.

Usage:

configure mono without the interpreter, such as:

```
$ ./autogen.sh --enable-minimal=interpreter ...
$ make; make install
```

run your favorite program with the interpreter and see it fail:

```
$ ./mono/mini/mono-sgen --interpreter ./mono/mini/basic.exe
Mono IL interpreter support is missing
```

despite `--enable-minimal=interpreter`, we can still build the interp
module:

```
% make -C mono/mini libmono-ee-interp-static.la
  CC       interp/libmono_ee_interp_static_la-interp.lo
  CC       interp/libmono_ee_interp_static_la-mintops.lo
  CC       interp/libmono_ee_interp_static_la-transform.lo
  CCLD     libmono-ee-interp-static.la
```

`libmono-ee-interp-static.a` can be statically linked into the target
application.

* [fixup] include libmono-ee-interp reference in runtime unit-tests
14 files changed:
mono/metadata/object-offsets.h
mono/mini/Makefile.am.in
mono/mini/driver.c
mono/mini/ee.h [copied from mono/mini/interp/interp.h with 75% similarity]
mono/mini/interp-stubs.c
mono/mini/interp/interp.c
mono/mini/interp/interp.h
mono/mini/mini-amd64.c
mono/mini/mini-arm.c
mono/mini/mini-arm64.c
mono/mini/mini-runtime.c
mono/mini/mini-runtime.h
mono/mini/mini.h
mono/unit-tests/Makefile.am