Switching default compiler on Unix from g++ to clang++
This commit is contained in:
8
Makefile
8
Makefile
@@ -109,8 +109,7 @@ else
|
|||||||
BUILD_VERSION:=$(GIT_REVISION)
|
BUILD_VERSION:=$(GIT_REVISION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXX=g++
|
CXX=clang++
|
||||||
CPP=cpp
|
|
||||||
OPT=-O2
|
OPT=-O2
|
||||||
CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -I$(CLANG_INCLUDE) \
|
CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -I$(CLANG_INCLUDE) \
|
||||||
$(LLVM_VERSION_DEF) \
|
$(LLVM_VERSION_DEF) \
|
||||||
@@ -202,9 +201,14 @@ ispc: print_llvm_src dirs $(OBJS)
|
|||||||
@$(CXX) $(OPT) $(LDFLAGS) -o $@ $(OBJS) $(ISPC_LIBS)
|
@$(CXX) $(OPT) $(LDFLAGS) -o $@ $(OBJS) $(ISPC_LIBS)
|
||||||
|
|
||||||
# Use clang as a default compiler, instead of gcc
|
# Use clang as a default compiler, instead of gcc
|
||||||
|
# This is default now.
|
||||||
clang: ispc
|
clang: ispc
|
||||||
clang: CXX=clang++
|
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
|
# Build ispc with address sanitizer instrumentation using clang compiler
|
||||||
# Note that this is not portable build
|
# Note that this is not portable build
|
||||||
asan: clang
|
asan: clang
|
||||||
|
|||||||
Reference in New Issue
Block a user