Skip to content

Commit

Permalink
[ACLiC] Handle -isysroot.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Oct 2, 2018
1 parent b9f9e5c commit c75c736
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/base/src/TSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2922,6 +2922,16 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
incPath.Append(fromConfig);
}
incPath.ReplaceAll(" -I",":"); // of form :dir1 :dir2:dir3
auto posISysRoot = incPath.Index(" -isysroot \"");
if (posISysRoot != kNPOS) {
auto posISysRootEnd = incPath.Index('"', posISysRoot + 12);
if (posISysRootEnd != kNPOS) {
// NOTE: should probably just skip isysroot for dependency analysis.
// (And will, in the future - once we rely on compiler-generated .d files.)
incPath.Insert(posISysRootEnd - 1, "/usr/include/");
incPath.Replace(posISysRoot, 12, ":\"");
}
}
while ( incPath.Index(" :") != -1 ) {
incPath.ReplaceAll(" :",":");
}
Expand Down

0 comments on commit c75c736

Please sign in to comment.