[llvm-dev] Total response file count limited to 21

Rui Ueyama via llvm-dev llvm-dev at lists.llvm.org
Mon May 6 22:43:25 PDT 2019

Instead of bumping up the threshold, can we detect a cycle in reference
files? We have `llvm::sys::fs::equivalent` to determine whether two file
descriptors are for the same file or not. It doesn't seem too hard to
detect a cycle using that function.

*From: *Chris Glover via llvm-dev <llvm-dev at lists.llvm.org>
*Date: *Tue, May 7, 2019 at 6:04 AM
*To: *James Y Knight
*Cc: *llvm-dev at lists.llvm.org

On Fri, May 3, 2019 at 1:30 PM James Y Knight via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> IMO, a limit of at most 20 nested response files would make a lot more
>> sense than 20 total response files. I don't think the total should really
>> have a limit at all.
>> Since we expand the files in place while iterating over the arglist, we'd
>> need to keep a separate array listing the end-offset of each file we're
>> currently nested within, and update the offsets with every expansion of
>> arguments. That's a bit more complex than just an integer count of number
>> of files seen so far, but it should be implementable completely within the
>> ExpandResponseFiles function, and I don't think it'd be _that_ tricky.
> Seems reasonable to me. And would absolutely solve the issue here (I think
> we only nest 2 or 3 levels deep).
>  If this is an agreed upon solution, I'd be happy to attempt to implement
> it.
> -- chris
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190507/9221bd26/attachment.html>

More information about the llvm-dev mailing list