extract_interface: do not take into account sysroot on search paths
commit2a8a17489b003b10ee5cdc04faa3d0cb8b7b4f1c
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Fri, 22 May 2020 17:29:04 +0000 (22 19:29 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Fri, 22 May 2020 19:31:00 +0000 (22 21:31 +0200)
tree957ae9b3fa8b6316a291fd878cdef5467d126645
parenta7ebe79813d77e3b02a52270b15a2d136043fdea
extract_interface: do not take into account sysroot on search paths

Since isl-0.22.1-298-g33d1089f23 (set sysroot if clang version used
for bindings generation cannot find stdio.h,
Sat Apr 4 14:17:04 2020 +0200), sysroot may get set on some versions
of OS X, but the search paths passed to extract_interface
are not relative to this sysroot, so the sysroot should be ignored
when adding them.

Note that the meaning of the relevant AddPath argument was reversed
in LLVM commit f64a560d74a (Make InitHeaderSearch::AddPath and
HeaderSearchOptions::AddPath consistent use an "IgnoreSysRoot" argument.
HeaderSearchOptions had been using the opposite form with
"IsSysRootRelative", which made for much confusion when looking
at true/false values in calls in AddPath.  No functional change.,
Tue Jun 21 21:53:08 2011 +0000), while the extra argument was
only removed in LLVM commit 606420e869a ([Frontend] Remove another
IsUserSpecified member variable that is now unused.,
Fri Jan 25 01:50:47 2013 +0000).
There is therefore a window where the wrong value is used,
but since sysroot is only set on recent versions of clang,
this should not be an issue.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
interface/extract_interface.cc