Skip to content

Commit a89adfe

Browse files
committed
feat: add error handling for missing Homebrew LLVM installation on macOS
1 parent bea6d01 commit a89adfe

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ if [ -z "$LDFLAGS_LIBCXX" ] && [[ "$OSTYPE" == "darwin"* ]]; then
2929
LLVM_PREFIX=$(brew --prefix llvm 2>/dev/null || echo "")
3030
if [ -n "$LLVM_PREFIX" ] && [ -d "$LLVM_PREFIX/lib/c++" ]; then
3131
export LDFLAGS_LIBCXX="-L$LLVM_PREFIX/lib/c++ -Wl,-rpath,$LLVM_PREFIX/lib/c++"
32+
else
33+
echo "Error: Homebrew LLVM not found or incomplete installation."
34+
echo "On macOS, this project requires Homebrew LLVM for proper linking."
35+
echo ""
36+
echo "To fix this:"
37+
echo " brew install llvm"
38+
echo ""
39+
echo "Then add Homebrew LLVM to your PATH by adding this to ~/.zshrc:"
40+
echo " export PATH=\"\$(brew --prefix llvm)/bin:\$PATH\""
41+
echo ""
42+
echo "Or run this command to add it automatically:"
43+
echo " echo 'export PATH=\"\$(brew --prefix llvm)/bin:\$PATH\"' >> ~/.zshrc"
44+
exit 1
3245
fi
3346
fi
3447

0 commit comments

Comments
 (0)