Skip to content

Commit

Permalink
Find zstd with pkg-config due to non-standard Homebrew installation o…
Browse files Browse the repository at this point in the history
…n M1

Fixes #18
  • Loading branch information
alan-j-hu committed Dec 30, 2023
1 parent 467b7e3 commit 163d549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions llvm.opam
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ depends: [
"dune" {>= "2.7"}
"ctypes" {>= "0.4"}
"conf-llvm" {build & = version}
"conf-pkg-config"
]
synopsis: "The OCaml bindings distributed with LLVM"
description: "Note: LLVM should be installed first."
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ if test -z "$default_mode"; then
fi

base_cflags=$(llvm_config --cflags)
ldflags="$(llvm_config --ldflags) -lstdc++"
# pkg-config libzstd necessary because Homebrew installs it in nonconventional
# location on Apple Silicon Macs
ldflags="$(llvm_config --ldflags) -lstdc++ $(pkg-config libzstd --libs)"
llvm_targets=$(llvm_config --targets-built)

rm -rf src
Expand Down

0 comments on commit 163d549

Please sign in to comment.