From 217889f81407de43d8de469ad93e05b7d334ae0c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 5 Oct 2014 14:46:54 +0300 Subject: [PATCH] Older versions of OS X don't have clang --- bootstrap.sh | 6 +++++- source/builder.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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)); -- 2.43.0