<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 18, 2016 at 4:30 PM, Bruno Cardoso Lopes <span dir="ltr"><<a href="mailto:bruno.cardoso@gmail.com" target="_blank">bruno.cardoso@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Richard,<br>
<br>
Turns out that the redefinition error was caused because libc++<br>
modulemap lacked a module for its "string.h", and therefore it would<br>
be textually included in more than one module, yielding the error.<br>
<br>
With the attached patch for libc++ modulemap (extracted from parts of<br>
a modulemap you previously attached to the thread) + your patch, I can<br>
successfully compile Darwin and selfhost clang with submodule local<br>
visibility.</blockquote><div><br></div><div>Awesome.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can also upstream the patches for you in case your too<br>
busy, let me know.<br></blockquote><div><br></div><div>Sure, go ahead.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
One minor note: the keyword name 'no_undeclared_includes' sounds a bit<br>
confusing, how about 'direct_uses_only', or something along these<br>
lines?<br></blockquote><div><br></div><div>Hmm. Ideally, we should try to pick something that captures the spirit of "only non-modular headers and headers from used modules". Something like "ignore_modules_not_declared_used", but less wordy?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Oct 17, 2016 at 3:59 PM, Bruno Cardoso Lopes<br>
<<a href="mailto:bruno.cardoso@gmail.com">bruno.cardoso@gmail.com</a>> wrote:<br>
>> @Bruno,<br>
>><br>
>> Can you try "-fdiagnostics-show-note-<wbr>include-stack” so we know the other path that leads to string.h?<br>
><br>
> Attached the complete error log (this snippet won't help without full<br>
> context anyway)<br>
<br>
--<br>
Bruno Cardoso Lopes<br>
<a href="http://www.brunocardoso.cc" rel="noreferrer" target="_blank">http://www.brunocardoso.cc</a><br>
</div></div></blockquote></div><br></div></div>