]> git.tdb.fi Git - builder.git/commitdiff
Also default to clang on FreeBSD
authorMikko Rasa <tdb@tdb.fi>
Mon, 6 Oct 2014 21:55:42 +0000 (00:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 6 Oct 2014 22:07:31 +0000 (01:07 +0300)
bootstrap.sh
source/builder.cpp

index 6464f1d85bac9fece9c347db771bf559f44c849e..f198f6f6ad5526b5045c654e5319a4f05922ce8d 100755 (executable)
@@ -14,7 +14,7 @@ if [ "$MACHINE" = "x86_64" ]; then
 else
        MULTIARCH="i386-linux-gnu"
 fi
-if [ "$SYSTEM" = "Darwin" ]; then
+if [ "$SYSTEM" = "Darwin" -o "$SYSTEM" = "FreeBSD" ]; then
        if which clang++ >/dev/null; then
                COMPILER="clang++"
        else
index 92475869235ea98d8139151f83d7145eb31297d5..e453a84eb73e178c4633799a59afc34810568933 100644 (file)
@@ -77,7 +77,8 @@ void Builder::set_temp_directory(const FS::Path &p)
 
 void Builder::add_default_tools()
 {
-       if(current_arch->get_system()=="darwin" && vfs.find_binary("clang"))
+       bool use_clang = (current_arch->get_system()=="darwin" || current_arch->get_system()=="freebsd");
+       if(use_clang && 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));