Skip to content

Instantly share code, notes, and snippets.

@euantorano
Created October 4, 2018 14:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save euantorano/428659d70e34c40023fa377bd48dffcc to your computer and use it in GitHub Desktop.
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 https://github.com/ziglang/zig.git
  • 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