This page will contain information on how to compile minix in LLVM with bitcode-based linking.
This allows LTO and instrumentation/analysis of the system.
1. git clone git@git.minix3.org:minix 2. cd minix 3. git remote add minix-llvm git@git.minix3.org:minix-llvm 4. git fetch minix-llvm 5. git checkout -t minix-llvm/master-llvm 6. [JOBS=1] ./minix/llvm/generate_gold_plugin.sh 7. [JOBS=1] BUILDVARS='-V MKBITCODE=yes' ./releasetools/x86_hdimage.sh
Replace 6,7 above with:
a. cd minix/llvm b. ./configure.llvm c. [C=modules] ./relink.llvm [args] d. [C=modules] ./build.llvm [args] e. ./clientctl buildimage f. ./clientctl run
After building the sources, we may wish to run some LLVM passes on the Minix bitcode files. There are a few LLVM passes available under minix/llvm/passes and they get installed into minix/llvm/bin directory. Following is how they could be used:
1. cd minix/llvm 2. [C=modules] [LLVM_PASS_ARGS=<arguments to llvm pass(es)>] ./build.llvm [<llvm-pass(es)>] example: C=pm ./build.llvm hello C=servers ./build.llvm hello weak-alias-module-override 3. ./clientctl buildimage 4. ./clientctl run
The following documentation has been generated from the LLVM sources available in the git repository. As such it should be more pertinent than the latest documentation available on the official LLVM website.
The documentation contains links to the official web site, so be sure to always check you did not lend on the official LLVM site.