Skip to content

Commit

Permalink
Try rebuild when build error with Clang
Browse files Browse the repository at this point in the history
主要针对没有Clang预编译版本的架构(例如mips)
否则该插件永远编译不过
  • Loading branch information
wangling12 authored Nov 5, 2020
1 parent 711cf83 commit 99b0fe7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,24 @@ function install_ycm()
read -p "Please choose to compile ycm with python2 or python3, if there is a problem with the current selection, please choose another one. [2/3] " version
if [[ $version == "2" ]]; then
echo "Compile ycm with python2."
python2.7 ./install.py --clang-completer
{
python2.7 ./install.py --clang-completer
} || {
echo "##########################################"
echo "Build error, trying rebuild without Clang."
echo "##########################################"
python2.7 ./install.py
}
else
echo "Compile ycm with python3."
python3 ./install.py --clang-completer
{
python3 ./install.py --clang-completer
} || {
echo "##########################################"
echo "Build error, trying rebuild without Clang."
echo "##########################################"
python3 ./install.py
}
fi
}

Expand Down

0 comments on commit 99b0fe7

Please sign in to comment.