From 8297edd251f6d93b8bed7eaba44baccfde4f2410 Mon Sep 17 00:00:00 2001 From: Dmitry Babokin Date: Wed, 9 Oct 2013 14:04:10 +0400 Subject: [PATCH] Switching default compiler on Unix from g++ to clang++ --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 097da238..6c7a5f4f 100644 --- a/Makefile +++ b/Makefile @@ -109,8 +109,7 @@ else BUILD_VERSION:=$(GIT_REVISION) endif -CXX=g++ -CPP=cpp +CXX=clang++ OPT=-O2 CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -I$(CLANG_INCLUDE) \ $(LLVM_VERSION_DEF) \ @@ -202,9 +201,14 @@ ispc: print_llvm_src dirs $(OBJS) @$(CXX) $(OPT) $(LDFLAGS) -o $@ $(OBJS) $(ISPC_LIBS) # Use clang as a default compiler, instead of gcc +# This is default now. clang: ispc clang: CXX=clang++ +# Use gcc as a default compiler, instead of gcc +gcc: ispc +gcc: CXX=clang++ + # Build ispc with address sanitizer instrumentation using clang compiler # Note that this is not portable build asan: clang