From ff6c280c5470175c7792dce9f2e309ba9c876f24 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 7 Oct 2014 00:55:42 +0300 Subject: [PATCH] Also default to clang on FreeBSD --- bootstrap.sh | 2 +- source/builder.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.45.2