Skip to content

Instantly share code, notes, and snippets.

@Axlfc
Created August 5, 2022 02:23
Show Gist options
  • Save Axlfc/305fa9851ce7fe6bc53b80647530d120 to your computer and use it in GitHub Desktop.
Save Axlfc/305fa9851ce7fe6bc53b80647530d120 to your computer and use it in GitHub Desktop.
How to Set Up Carbon Programming Language Manually on Ubuntu 22.04
sudo apt install -y apt-transport-https curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
sudo apt update -y && sudo apt install -y bazel clang lldb lld openjdk-8-jdk llvm build-essential libc++-dev
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
export CC=$(which clang)' >> ~/.profile
git clone https://github.com/carbon-language/carbon-lang
cd carbon-lang
bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment