README.md
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 30 Aug 2016 16:57:29 +0100
changeset 78 7a4c769a9fea
parent 47 d1d3901866d4
permissions -rw-r--r--
llvm_c_ext: Improved `LLVMSetMetadata2()` to support also function values ...in addition to instruction values. This is handy to attach data to functions, such as debugging information. Added Smalltalk API for setting metadata nodes on instructions and functions.

# LLVM-S:  A Smalltalk(X) bindings to LLVM compiler toolchain

LLVM-S provides bindings to LLVM toolchain for Smalltalk(X) to allow experimentation
with LLVM toolchain in context of Smalltalk technology - both as a JIT backend and
an AOT compiler.

## Prerequisites

* An x96_64 Linux box
* GNU Make & C++ compiler (GCC / Clang would do it)
* LLVM *3.8* installation - requires libLLVM.so shared library

## Loading into Smalltalk/X

**1.** Get [Smalltalk/X jv-branch](https://swing.fit.cvut.cz/projects/stx-jv/) (preferably a night build)

**2.** Clone the repository

```
#!bash
    mkdir -p ~/SmalltalkXProjects/jv
    hg clone https://bitbucket.org/janvrany/jv-llvm-s ~/SmalltalkXProjects/jv/llvm_s
```

**3.** Compile LLVM C Extension library

```
#!bash
    cd ~/SmalltalkXProjects/jv/llvm_s/llvm_c_ext
    make LLVM_CONFIG=~/path/to/llvm-3.8/bin/llvm-config
```

**4.** Load the package into Smalltalk/X 
```
#!smalltalk
    Smalltalk loadPackage: 'jv:llvm_s'.
```

## Loading into other Smalltalks

Currently LLVM-S is available only for Smalltalk/X, though the I (Jan Vrany) am willing to (help to) 
make it working on other Smalltalk implementation if there's an interest. In that case, get in touch with
me to discuss details.

## Documentation 

* [Project wiki](https://bitbucket.org/janvrany/jv-llvm-s/wiki/Home)

But do not expect much - it's still more an experimental project so it's expected to change a lot
in **non**-backward compatible way:

## Authors

* Jan Vrany

## License

This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:

* all modification to the code will be sent to the
  original author for inclusion in future releases
* this is not used in any commercial software

**This license is provisional and may (will) change in
a future.**