[cfe-commits] r140409 - in /cfe/trunk: docs/tools/clang.pod include/clang/Driver/Options.td lib/Driver/Driver.cpp

Daniel Dunbar daniel at zuster.org
Fri Sep 30 14:39:41 PDT 2011


On Fri, Sep 30, 2011 at 2:30 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Sep 30, 2011, at 2:25 PM, Daniel Dunbar wrote:
>
>> To be honest, I had forgotten we already had implemented that.
>>
>> I was being a bit lazy here (ok maybe more than a bit), I just wanted
>> to be able to test out the impact of being able to do the chdir() in
>> process and avoiding an extra process spawn. To properly fix this to
>> use -working-directory= (and guarantee no behavior change) will take a
>> bit more work, as there are:
>> (a) a few places in the driver that access the file system.
>
> These sound like bugs to be fixed.

Yup. Not sure if it makes sense to be using FileManager in the Driver,
but it would make it more obvious where VFS stuff should fit in so
perhaps not a bad idea anyway.

>> (b) the driver will have to do something to honor that option when it
>> is calling out to other processes (like the linker), or be able to
>> adjust paths.
>
> I think it's entirely reasonable to temporarily chdir() when calling those other processes.

I wouldn't want to do that, I would rather use a stub to do the
directory change if necessary. If we are going to get that close to
being working-directory agnostic, might as well go the full way.

 - Daniel

>> I think for now I'm going to just revert my patch and think about this more.
>
> Okay.
>
>        - Doug
>




More information about the cfe-commits mailing list