From: Mikko Rasa Date: Sun, 5 Oct 2014 11:46:54 +0000 (+0300) Subject: Older versions of OS X don't have clang X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=217889f81407de43d8de469ad93e05b7d334ae0c;p=builder.git Older versions of OS X don't have clang --- diff --git a/bootstrap.sh b/bootstrap.sh index 48a4f20..9355b27 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -15,7 +15,11 @@ else MULTIARCH="i386-linux-gnu" fi if [ "$SYSTEM" = "Darwin" ]; then - COMPILER="clang++" + if which clang++ >/dev/null; then + COMPILER="clang++" + else + COMPILER="g++" + fi else COMPILER="g++" fi diff --git a/source/builder.cpp b/source/builder.cpp index 3776e36..9247586 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -77,7 +77,7 @@ void Builder::set_temp_directory(const FS::Path &p) void Builder::add_default_tools() { - if(current_arch->get_system()=="darwin") + if(current_arch->get_system()=="darwin" && vfs.find_binary("clang")) toolchain.add_toolchain(new ClangTools(*this, *current_arch)); if(current_arch->get_system()=="android") toolchain.add_toolchain(new AndroidTools(*this, *current_arch));