[cfe-commits] [PATCH] Warn if -isysroot is given an invalid path

Chad Rosier mcrosier at apple.com
Fri Dec 14 09:16:37 PST 2012


On Dec 14, 2012, at 9:14 AM, Eric Christopher <echristo at gmail.com> wrote:

> 
> 
> 
> On Fri, Dec 14, 2012 at 9:08 AM, Chad Rosier <mcrosier at apple.com> wrote:
> On Dec 13, 2012, at 10:30 PM, Eric Christopher <echristo at gmail.com> wrote:
> 
>> On Thu, Dec 13, 2012 at 4:54 PM, Chad Rosier <mcrosier at apple.com> wrote:
>> All,
>> The attached patch emits a warning in the frontend if the -isysroot flag is given an invalid directory.  I've implemented this using llvm::sys:fs::exists(), but please let me know if FileManager::getStatValue() (or another option) is preferred; I'll modify the patch accordingly.  I'll also add a test case before pushing the final commit.
>> 
>> Curious: What's the motivation here? I can see it as being potentially more serious than -I /some/invalid/path but we don't warn on that one (at least as far as I know).
> 
> No, we don't.
> 
>> 
>> Not against it, just curious. :)
> 
> It was requested by an internal developer to ease the burden of debugging build failures. :)
> 
> Useful, but I'd worry about Joerg's comment.

I'm going to solicit more internal feedback to see if this is really what we want.

> I can see bootstrapping scenarios such that you wouldn't want it. Possible to only put this warning into -Weverything and not into any other warning level? (TBH I didn't look at the patch so you may have done this…)

I didn't put it under -Weverything, but that's a good suggestion.  Thanks, Eric.

> 
> -eric 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121214/c12637cf/attachment.html>


More information about the cfe-commits mailing list