Skip to content

Make it easier to build on macOS and FreeBSD

Yorick Peterse requested to merge yorickpeterse/llvm-sys.rs:main into main

For FreeBSD, it seems that sometimes one must set LIBRARY_PATH to /usr/local/lib to find zstd and possibly other libraries, though this doesn't always seem to be required. It's possible this is specific to certain LLVM versions or perhaps even FreeBSD versions, but it doesn't hurt to ensure the directory is always included.

For macOS, Homebrew installs LLVM in a non-standard location that compilers won't find by default. In addition, you can have multiple LLVM versions installed at the same time, so you can't just blindly search through /opt/homebrew/lib. This MR includes a set of changes that ensure one can now build llvm-sys on macOS with Homebrew, without having to set LIBRARY_PATH or PATH to the correct directories.

Merge request reports

Loading