Standardize directory names

Tried using clang/llvm from ubuntu distribution.  Needed to change the include directory for compiling ICG. Also found that
the clang include files can be in a linked directory.  Used realpath to make sure we have the absolute path.

refs #63
This commit is contained in:
Alex Lin 2015-06-12 16:59:00 -05:00
parent eed8837478
commit 8193b5de7b
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,8 @@ void HeaderSearchDirs::AddCompilerBuiltInSearchDirs () {
icg_dir << "." << __clang_patchlevel__ ;
#endif
icg_dir << "/include" ;
hso.AddPath(icg_dir.str() , clang::frontend::System, IsFramework, IsSysRootRelative);
char * resolved_path = realpath(icg_dir.str().c_str(), NULL ) ;
hso.AddPath(resolved_path , clang::frontend::System, IsFramework, IsSysRootRelative);
#endif
fp = popen("${TRICK_HOME}/bin/trick-gte TRICK_CPPC" , "r") ;

View File

@ -4,7 +4,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
CC := $(shell $(LLVM_HOME)/bin/llvm-config --bindir)/clang
CXX := $(shell $(LLVM_HOME)/bin/llvm-config --bindir)/clang++
CXXFLAGS := -I${LLVM_HOME}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti
CXXFLAGS := -I$(shell $(LLVM_HOME)/bin/llvm-config --includedir) -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti
CLANG_MINOR_GTEQ5 := $(shell expr `$(LLVM_HOME)/bin/llvm-config --version | cut -f2 -d. ` \>= 5 )