mirror of
https://github.com/nasa/trick.git
synced 2025-06-21 08:29:39 +00:00
trick-ICG fails when using clang < 3.4
The clang path created uses the patchlevel which prior to 3.4 was not used by clang. This resulted in a bad being created and eventually an llvm assertion error. Added a compiler ifdef so that the patchlevel is not used before 3.4 refs #65
This commit is contained in:
@ -39,12 +39,16 @@ void HeaderSearchDirs::AddCompilerBuiltInSearchDirs () {
|
||||
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
|
||||
#endif
|
||||
icg_dir << "/include" ;
|
||||
char * resolved_path = realpath(icg_dir.str().c_str(), NULL ) ;
|
||||
hso.AddPath(resolved_path , clang::frontend::System, IsFramework, IsSysRootRelative);
|
||||
if ( resolved_path != NULL ) {
|
||||
hso.AddPath(resolved_path , clang::frontend::System, IsFramework, IsSysRootRelative);
|
||||
}
|
||||
#endif
|
||||
|
||||
fp = popen("${TRICK_HOME}/bin/trick-gte TRICK_CPPC" , "r") ;
|
||||
|
Reference in New Issue
Block a user