ICG fails to compile on Mac when using clang/llvm 3.8.1. #271

Modified the makefile to define LIBCLANG_MAJOR, LIBCLANG_MINOR, and
LIBCLANG_PATCHLEVEL based on the llvm-config executable in the llvm
directory pointed to by the configuration.  These new variable names
are independent of the __clang_major__, etc. variables we were defining
only in Linux.  Using these names, we can reduce the clang version
checks to a single consistent set of version numbers.  We don't have
to deal with the different version numbers assigned by Apple.
This commit is contained in:
Alex Lin
2016-07-25 14:57:07 -05:00
parent df94af17df
commit f7d1ff6376
4 changed files with 16 additions and 39 deletions

View File

@ -426,11 +426,7 @@ void PrintAttributes::printIOMakefile() {
makefile_io_src << std::endl ;
makefile_io_src << "ifeq ($(IS_CC_CLANG), 0)" << std::endl ;
makefile_io_src << " TRICK_SYSTEM_CXXFLAGS += -Wno-unused-local-typedefs" << std::endl ;
makefile_io_src << " GCCVERSIONGTEQ48 := $(shell perl -e 'printf \"\%d\\n\", " <<
"($(GCC_MAJOR)>4)||(($(GCC_MAJOR)==4)&&($(GCC_MINOR)>=8)) ;' )" << std::endl ;
makefile_io_src << " ifeq ($(GCCVERSIONGTEQ48), 1)" << std::endl ;
makefile_io_src << " TRICK_SYSTEM_CXXFLAGS += -Wno-unused-but-set-variable" << std::endl ;
makefile_io_src << " endif" << std::endl ;
makefile_io_src << "endif" << std::endl ;
makefile_io_src << std::endl ;
makefile_io_src << "ifdef TRICK_VERBOSE_BUILD" << std::endl ;