[cfe-commits] r163776 - /cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

NAKAMURA Takumi geek4civic at gmail.com
Wed Sep 12 23:42:30 PDT 2012


2012/9/13 Chandler Carruth <chandlerc at google.com>:
> On Wed, Sep 12, 2012 at 11:10 PM, NAKAMURA Takumi <geek4civic at gmail.com>
> wrote:
>>
>> 2012/9/13 Chandler Carruth <chandlerc at google.com>:
>> > On Wed, Sep 12, 2012 at 10:53 PM, NAKAMURA Takumi <geek4civic at gmail.com>
>> > wrote:
>> >>
>> >> Author: chapuni
>> >> Date: Thu Sep 13 00:53:23 2012
>> >> New Revision: 163776
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=163776&view=rev
>> >> Log:
>> >> InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.
>> >
>> >
>> > No, this is completely wrong. The set of paths to search for headers
>> > should
>> > never have anything to do with the *host*, only the *target*. Please
>> > revert
>> > this and let's actually talk about the problem you're solving here.
>>
>> I think Driveletter-based paths would be useless and ignored safely on
>> non-Win32 hosts (including cygwin). It's host's issue really.
>
>
> In what way can this possibly be a host issue?
>
> If I build a Clang binary on my linux machine, and then on a windows machine
> run it under some magical emulation layer, it will suddenly use these paths.

I won't imagine that! I suppose such a emulator should use posix-like
path, like cygwin.

> The header search is a strictly *target* concern, and it should be the same
> regardless of the host on which the compiler is built.

I rather think "The header search can be affected by both host and target."

>> > If you're trying to clean up the mingw header search, please as a first
>> > step
>> > let's move it to the Driver.
>>
>> I would like bots (esp., cross things) let fine at first.
>
> I think this is the wrong sequence. I would much prefer you get the
> architecture right than add hacks now that we have to some how undo later
> just to preserve bot behavior that may not have been the correct behavior.

Still I am thinking what the correct behavior could be. I wish
something cool *unified driver*.
On mingw, unfortunately, libstdc++ (and libsupc++) are GCC's
properties, and they are in $(MINGW)/lib/gcc/mingw.

Ultimately, we should distribute our own mingw32, w32api, libcxx,
libcxxabi and compiler-rt with clang.
Then hacks could be thrown away.



More information about the cfe-commits mailing list