Skip to content

FreeBSD: Search for newest clang compatible candidate #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,19 @@ if [ -z "${HOST_CC}" ] ; then
if [ "$(uname -s)" == "Darwin" ] ; then
HOST_CC="$(xcrun_find_tool clang)"
HOST_CXX="$(xcrun_find_tool clang++)"
elif [ "$(uname -s)" == "FreeBSD" ]; then
if [ $(sysctl -n kern.osreldate) -ge 1100000 ]; then
HOST_CC="clang"
HOST_CXX="clang++"
else
for clang_candidate_suffix in "38" "37" "36" "35" ; do
if which "clang${clang_candidate_suffix}" > /dev/null ; then
HOST_CC="clang${clang_candidate_suffix}"
HOST_CXX="clang++${clang_candidate_suffix}"
break
fi
done
fi
else
for clang_candidate_suffix in "" "-3.8" "-3.7" "-3.6" "-3.5" ; do
if which "clang${clang_candidate_suffix}" > /dev/null ; then
Expand Down