From 713d090743266382a5c941e4202c29b9580df6a4 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Mon, 28 Jun 2021 03:34:34 -0700 Subject: [PATCH] [sledge] Make workaround for broken llvm-config easier Summary: Change the Makefile comment about how to enable shared library linking despite llvm-config being broken into a rule. Reviewed By: ngorogiannis Differential Revision: D28907814 fbshipit-source-id: ac63d0104 --- sledge/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sledge/Makefile b/sledge/Makefile index 97dc722c8..2ecc6ee9c 100644 --- a/sledge/Makefile +++ b/sledge/Makefile @@ -27,13 +27,14 @@ LLVM_OCAML_SRC = $(shell git ls-files -- vendor/llvm-dune) # file to use as a sentinel indicating llvm ocaml bindings are up-to-date LLVM_OCAML_SENTINEL=vendor/llvm-dune/src/llvm/common/dune -# Note that this does not correctly detect llvm shared libraries on -# macos since llvm-config is broken. A filthy workaround seems to be -# to create the libLLVM-11.dylib file llvm-config looks for as a -# symbolic link to libLLVM.dylib. That is, to manually in the shell -# execute: -# (LLVMLIB=$($(opam config var conf-llvm:config) --libdir); -# ln -s $LLVMLIB/libLLVM.dylib $LLVMLIB/libLLVM-11.dylib) +# Note that llvm-config is broken and does not correctly detect llvm +# shared libraries. A filthy workaround seems to be to create the +# libLLVM-11.dylib file llvm-config looks for as a symbolic link to +# libLLVM.dylib. +link_llvm_dylib: + @set -e ;\ + LLVMLIB=$$($$(opam config var conf-llvm:config) --libdir) ;\ + ln -s $$LLVMLIB/libLLVM.dylib $$LLVMLIB/libLLVM-11.dylib $(LLVM_OCAML_SENTINEL): $(LLVM_OCAML_SRC) cd vendor/llvm-dune; ./setup.sh $$(opam config var conf-llvm:config) &>/dev/null