diff --git a/Makefile b/Makefile index ebfe22d3..1b13d2e0 100644 --- a/Makefile +++ b/Makefile @@ -134,12 +134,18 @@ ispc: print_llvm_src dirs $(OBJS) @echo Creating ispc executable @$(CXX) $(OPT) $(LDFLAGS) -o $@ $(OBJS) $(ISPC_LIBS) +# Use clang as a default compiler, instead of gcc +clang: ispc +clang: CXX=clang++ + # Build ispc with address sanitizer instrumentation using clang compiler # Note that this is not portable build -asan: ispc -asan: CXX=clang++ +asan: clang asan: OPT+=-fsanitize=address +# Do debug build, i.e. -O0 -g +debug: ispc +debug: OPT=-O0 -g objs/%.o: %.cpp @echo Compiling $<