From 77bbfc0020416096736f3a5fdd9767e7af9631cc Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Thu, 21 Jul 2016 19:33:04 +0200 Subject: [PATCH] Only use -I../../include if this is cling (ancient ROOT-4455). --- lib/Interpreter/Interpreter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Interpreter/Interpreter.cpp b/lib/Interpreter/Interpreter.cpp index da007bc2..afc5c4da 100644 --- a/lib/Interpreter/Interpreter.cpp +++ b/lib/Interpreter/Interpreter.cpp @@ -308,7 +308,9 @@ namespace cling { AddIncludePath(InclPaths); #endif llvm::SmallString<512> P(GetExecutablePath(argv0)); - if (!P.empty()) { + if (!P.empty() + && llvm::StringRef(argv0).endswith("cling") + && llvm::sys::path::filename(P) == "cling") { // Remove /cling from foo/bin/clang llvm::StringRef ExeIncl = llvm::sys::path::parent_path(P); // Remove /bin from foo/bin