Zilliqa / scilla-compiler

Compile Scilla to LLVM-IR
GNU General Public License v3.0
7 stars 4 forks source link

Support newer LLVM versions #97

Closed anton-trunov closed 2 years ago

anton-trunov commented 2 years ago

We currently support LLVM 13 (and maybe some previous versions) but there are already more LLVM releases out there.

jubnzv commented 2 years ago

It seems, that there are no functional changes in the generated LLVM IR when compiling test contracts with the recent versions of LLVM.

But the problem is that the latest LLVM version available in the opam repository is 13.0.0: https://github.com/ocaml/opam-repository/tree/master/packages/llvm.

So, if one wants to use the latest LLVM, they should:

  1. Install deprecated versions of llvm and conf-llvm from the opam to make sure that dune sees these libraries (or to somehow hack our build system).
  2. Build the recent version of OCaml LLVM bindings from source and install them in the current opam switch as it suggested in this script.
  3. Then build the compiler.

I think we don't want to complicate the installation process for the miners by making them build LLVM from sources, either we don't want to ship our own LLVM package.

Probably, the most straightforward way to update LLVM is to create and publish the latest release (14.0.6 is currently the stable one) to the opam repository and then just update the llvm dependency in our repo.

anton-trunov commented 2 years ago

Probably, the most straightforward way to update LLVM is to create and publish the latest release (14.0.6 is currently the stable one) to the opam repository and then just update the llvm dependency in our repo.

Let's go for it. It will pay off

jubnzv commented 2 years ago

https://github.com/ocaml/opam-repository/pull/21932