Last active
May 10, 2017 22:35
-
-
Save diasbruno/f8882d8493edbc5f9cb800d0b9f90d54 to your computer and use it in GitHub Desktop.
compile irony server on mac os x.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first brew install llvm --with-clang | |
IRONY_PATH=`ls -1 ~/.emacs.d/elpa/ | grep ^irony | head -n 1` | |
LLVM_CONFIG=`which llvm-config` | |
if [ -z $LLVM_CONFIG ]; then | |
echo "llvm-config was not found. trying to find it at /usr/local..." | |
LLVM_CONFIG=`find /usr/local -type f -name llvm-config | head -n 1` | |
fi | |
LIBCLANG_LIBRARY=`$LLVM_CONFIG --libdir`/libclang.dylib | |
LIBCLANG_INCLUDE=`$LLVM_CONFIG --includedir` | |
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ | |
-DLIBCLANG_LIBRARY=$LIBCLANG_LIBRARY \ | |
-DLIBCLANG_INCLUDE_DIR=$LIBCLANG_INCLUDE \ | |
-DCMAKE_INSTALL_PREFIX\=~/.emacs.d/irony/ ~/.emacs.d/elpa/$IRONY_PATH/server &&\ | |
cmake --build . --use-stderr --config Release --target install |
Yes, it's just an workaround. But I'll try to improve it.
llvm-config --includedir and --libdir if we have llvm-config available.
I don't know why, but it seems that brew don't link the llvm/{version}/bin.
@pmetzger we can try to find on common places where llvm could be installed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Might be better to use llvm-config to get the paths?