Enable relocatable binaries (ROOT-5939).

Even if CLING_INCLUDE_PATHS is set, cling might end up elsewhere.
So always look for the include/ that's next to bin/cling.
This commit is contained in:
Axel Naumann 2014-01-16 17:00:35 +01:00 committed by sftnight
parent 1465ec4d8a
commit f6ac9d494b

View File

@ -195,7 +195,7 @@ namespace cling {
}
// Add remaining part
AddIncludePath(InclPaths);
#else
#endif
llvm::SmallString<512> P(GetExecutablePath(argv[0]));
if (!P.empty()) {
// Remove /cling from foo/bin/clang
@ -209,7 +209,6 @@ namespace cling {
if (llvm::sys::fs::is_directory(P.str()))
AddIncludePath(P.str());
}
#endif
// Enable incremental processing, which prevents the preprocessor destroying
// the lexer on EOF token.