Skip to content

Instantly share code, notes, and snippets.

Created Oct 4, 2018
What would you like to do?
Build Zig on FreeBSD

FreeBSD Update

  • freebsd-update fetch
  • freebsd-update install

Package Update

  • pkg update -y

Ports Fetch

  • portsnap fetch
  • portsnap extract

Build llvm70 port

  • cd /usr/ports/devel/llvm70
  • sudo make -DBATCH install clean
  • Wait... a lot

Build Zig

  • git clone
  • cd zig
  • mkdir build
  • cd build
  • cmake .. -DCMAKE_PREFIX_PATH=/usr/local/llvm70/ -DCMAKE_BUILD_TYPE=Release
  • make VERBOSE=1
  • make install
  • ./zig build --build-file ../build.zig test -Dskip-release-small
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment