README.md
changeset 47 d1d3901866d4
parent 14 c7dea3fcc5a7
equal deleted inserted replaced
46:ed599c4d3e94 47:d1d3901866d4
     1 # LLVM-S:  A Smalltalk(X) bindings to LLVM compiler toolchain
     1 # LLVM-S:  A Smalltalk(X) bindings to LLVM compiler toolchain
     2 
     2 
     3 LLVM-S provides bindings to LLVM toolchain for Smalltalk(X) to allow experimentation
     3 LLVM-S provides bindings to LLVM toolchain for Smalltalk(X) to allow experimentation
     4 with LLVM toolchain in context of Smalltalk technology - both as a JIT backend and
     4 with LLVM toolchain in context of Smalltalk technology - both as a JIT backend and
     5 an AOT compiler.
     5 an AOT compiler.
       
     6 
       
     7 ## Prerequisites
       
     8 
       
     9 * An x96_64 Linux box
       
    10 * GNU Make & C++ compiler (GCC / Clang would do it)
       
    11 * LLVM *3.8* installation - requires libLLVM.so shared library
     6 
    12 
     7 ## Loading into Smalltalk/X
    13 ## Loading into Smalltalk/X
     8 
    14 
     9 **1.** Get [Smalltalk/X jv-branch](https://swing.fit.cvut.cz/projects/stx-jv/) (preferably a night build)
    15 **1.** Get [Smalltalk/X jv-branch](https://swing.fit.cvut.cz/projects/stx-jv/) (preferably a night build)
    10 
    16 
    14 #!bash
    20 #!bash
    15     mkdir -p ~/SmalltalkXProjects/jv
    21     mkdir -p ~/SmalltalkXProjects/jv
    16     hg clone https://bitbucket.org/janvrany/jv-llvm-s ~/SmalltalkXProjects/jv/llvm_s
    22     hg clone https://bitbucket.org/janvrany/jv-llvm-s ~/SmalltalkXProjects/jv/llvm_s
    17 ```
    23 ```
    18 
    24 
    19 **3.** Load the package into Smalltalk/X 
    25 **3.** Compile LLVM C Extension library
       
    26 
       
    27 ```
       
    28 #!bash
       
    29     cd ~/SmalltalkXProjects/jv/llvm_s/llvm_c_ext
       
    30     make LLVM_CONFIG=~/path/to/llvm-3.8/bin/llvm-config
       
    31 ```
       
    32 
       
    33 **4.** Load the package into Smalltalk/X 
    20 ```
    34 ```
    21 #!smalltalk
    35 #!smalltalk
    22     Smalltalk loadPackage: 'jv:llvm_s'.
    36     Smalltalk loadPackage: 'jv:llvm_s'.
    23 ```
    37 ```
    24 
    38