diff --git a/Makefile b/Makefile index 4a948983..10deb342 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,8 @@ BUILD_VERSION=$(shell git log --abbrev-commit --abbrev=16 | head -1) CXX=g++ CPP=cpp -CXXFLAGS=-g3 $(LLVM_CXXFLAGS) -I. -Iobjs/ -Wall $(LLVM_VERSION_DEF) \ +OPT=-g3 +CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -Wall $(LLVM_VERSION_DEF) \ -DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_VERSION="\"$(BUILD_VERSION)\"" LDFLAGS= diff --git a/ispc.cpp b/ispc.cpp index 46e32d77..327d994d 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -353,7 +353,8 @@ Globals::Globals() { #ifdef ISPC_IS_WINDOWS _getcwd(currentDirectory, sizeof(currentDirectory)); #else - getcwd(currentDirectory, sizeof(currentDirectory)); + if (getcwd(currentDirectory, sizeof(currentDirectory)) == NULL) + FATAL("Current directory path too long!"); #endif }