]> git.tdb.fi Git - builder.git/commitdiff
Older versions of OS X don't have clang
authorMikko Rasa <tdb@tdb.fi>
Sun, 5 Oct 2014 11:46:54 +0000 (14:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 5 Oct 2014 11:48:26 +0000 (14:48 +0300)
bootstrap.sh
source/builder.cpp

index 48a4f206bb75b673280bc5fc331dc8ec2608b4e5..9355b27e098264b0fc4d9de99d7a8f5f0f725c7a 100755 (executable)
@@ -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
index 3776e36ef169dc09db238d2630a16f051cc17de5..92475869235ea98d8139151f83d7145eb31297d5 100644 (file)
@@ -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));