BO is an llvm based programming language to write smart contract. It is based on a modified version of LLVM to enhance its ability to process BPF bytecode.
LLVM is a set of tools and framework for users to create powerful compilers. We use LLVM to create BO language, which enhance the BPF part. This version is not yet pulled to the LLVM mainline
We use docker file to build LLVM binaries. The offical github repo convietnly provides several template for use to modify. More details about the LLVM docker, can be found here. This very docker is modified from here.
As we are working on Ubuntu 18.04 LTS, which is Debian 10. The version of Debian version of Ubuntu can be found via
vim /etc/debian_version
buster/sid
Buster is the development codename for Debian 10.
Two sets of images will be built, Linux and MacOS.
Results are saved to /docker_image
folder, then tagged and pushed to bitconch/llvm on dockerhub.com.
- install docker
sudo apt install docker.io
-
manage docker as non-root user (remove sudo ahead of docker)
create the docker user group
sudo groupadd docker
Add your the current user to the docker group, replace $USER with any user you like
sudo usermod -aG docker $USER
or
sudo usermod -aG docker peter
**notice**: need to log off and log in, in order the change take effect.
verify docker works perfectly.
more details can be found on [docker offical website](https://docs.docker.com/install/linux/linux-postinstall/)
docker run hello-world
- log into docker hub
docker login -u username -p password
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
- build docker file and copy to
$ ./build.sh
This repos is onlly a builder, all the sources are stored in the following repos
- llvm
- clang
- clang-tools-extra
- compiler-rt
- lld
Any changes that need to go into an LLVM release must be made in the appropriate repos listed above.
linux/build.sh ---> sync and build for Linux(Debian 10)
macos/build.sh ---> sync and build for MacOS