mirror of
https://github.com/nasa/trick.git
synced 2025-06-21 08:29:39 +00:00
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:
@ -39,11 +39,9 @@ void HeaderSearchDirs::AddCompilerBuiltInSearchDirs () {
|
||||
#if __linux
|
||||
std::stringstream icg_dir ;
|
||||
icg_dir << LLVM_HOME << "/lib/clang/" ;
|
||||
icg_dir << __clang_major__ << "." << __clang_minor__ ;
|
||||
#if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ >= 4))
|
||||
#ifdef __clang_patchlevel__
|
||||
icg_dir << "." << __clang_patchlevel__ ;
|
||||
#endif
|
||||
icg_dir << LIBCLANG_MAJOR << "." << LIBCLANG_MINOR ;
|
||||
#ifdef LIBCLANG_PATCHLEVEL
|
||||
icg_dir << "." << LIBCLANG_PATCHLEVEL ;
|
||||
#endif
|
||||
icg_dir << "/include" ;
|
||||
char * resolved_path = realpath(icg_dir.str().c_str(), NULL ) ;
|
||||
|
Reference in New Issue
Block a user