From: Mikko Rasa Date: Mon, 6 Oct 2014 21:55:42 +0000 (+0300) Subject: Also default to clang on FreeBSD X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=ff6c280c5470175c7792dce9f2e309ba9c876f24 Also default to clang on FreeBSD --- diff --git a/bootstrap.sh b/bootstrap.sh index 6464f1d..f198f6f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 diff --git a/source/builder.cpp b/source/builder.cpp index 9247586..e453a84 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -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));