Created
September 15, 2022 05:46
-
-
Save alexjgriffith/318e5c157edb4b8e7156cf4b183547b5 to your computer and use it in GitHub Desktop.
Building Zig using Cmake on Ubuntu 20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following is for ziglang commit 86dc982e74dd17633d2bdc0f5ba8e36c55f78053 | |
# This commit required llvm15, check the cmake errors to see which | |
# version of llvm you need. | |
# I assume you've already installed cmake git etc | |
# Check https://apt.llvm.org/ to see alternatives to this garbage | |
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
# Install the dependencies not found on path | |
# I'm not sure if the devs are required | |
sudo apt-get install liblld-15 liblld-15-dev | |
sudo apt-get install libclang1-15-dev libclang-15-dev | |
sudo apt-get install libllvm15 | |
git clone https://github.com/ziglang/zig.git | |
cd zig | |
# find the most recent commit that passed all its tests | |
git checkout 86dc982e | |
mkdir build | |
cd build | |
cmake .. && make | |
# link zig somewhere on your path I keep my local | |
# executables linked to $HOME/bin | |
ln -s ${PWD}/stage3/bin/zig $HOME/place/on/path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment