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

Eric Christopher echristo at gmail.com
Fri Dec 14 09:14:07 PST 2012

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 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...)

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

More information about the cfe-commits mailing list