[cfe-dev] Any differences between Windows and Linux header search?

Reid Kleckner rnk at google.com
Mon Aug 26 09:29:22 PDT 2013


On Mon, Aug 26, 2013 at 4:30 AM, papin_g <guillaume.papin at epitech.eu> wrote:

>  Hi,
>
> I was wondering if there is any known differences on the way the header
> path search is performed between Windows and Unix like systems? Especially
> regarding angled #include <> resolution.
> Or maybe the difference can be with virtual file mapping between the two
> platforms.
>
> I'm working on the C++11 migrator where I made a class to modify #include
> directives but I have a hard time getting the unit tests to work on the
> Windows build bots.
>
> The IncludeDirectivesTest.cpp file available here:
> http://llvm-reviews.chandlerc.com/D1438#ca09f9a2
> The buildbots errors are about the includes not being found, see :
> - http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/4176
> - http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3837
>
>
> The test setups some virtual files (headers) using
> FileManager::getVirtualFile() and SourceManager::overrideFileContents().
> The virtual files are mapped in "$(pwd)/virtual/HEADER" and $(pwd) is
> added to the header search path with the option "-I".
>

This is a completely random guess, but try -isystem $(pwd) if you're using
angle bracket includes.  I don't know why the behavior of -I would differ
from *nix to Windows.


> It looks like to me the test has no dependencies on the file system
> specifics but it breaks only on the  Windows build bots.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130826/8f670028/attachment.html>


More information about the cfe-dev mailing list