<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><strong>From: </strong>Chris Glover via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>></span><br><strong>Date: </strong>Tue, May 7, 2019 at 6:04 AM<br><strong>To: </strong>James Y Knight<br><strong>Cc: </strong><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Fri, May 3, 2019 at 1:30 PM James Y Knight via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">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.</div><div dir="ltr"><br></div><div dir="ltr">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.</div><div dir="ltr"><div><br></div></div></div></blockquote><div><br></div><div>Seems reasonable to me. And would absolutely solve the issue here (I think we only nest 2 or 3 levels deep).</div><div><br></div><div> If this is an agreed upon solution, I'd be happy to attempt to implement it.</div><div><br></div><div>-- chris</div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>