<div dir="ltr"><div dir="ltr">On Thu, Jun 27, 2019 at 4:16 PM Siva Chandra via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">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"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 3:56 PM Zachary Turner <<a href="mailto:zturner@roblox.com" target="_blank">zturner@roblox.com</a>> wrote:<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 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">No, I do not think we want to mix up CRTs on any platform. At the<br>
least, it will be disruptive to the compiler drivers. Our goal is to<br>
build a CRT with supports statically linked executables on Linux. We<br>
do not intend to mix this new CRT with the CRT from the system libc.<br>
The new CRT might only be useful after a non-trivial part of the libc<br>
has been built. Until then, we have to use the CRT from the system<br>
libc.<br></blockquote></div></div></blockquote><div> </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 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"></blockquote><div>How would you perform redirection if both copies are not linked in? Some sort of out-of-process mechanism? Or maybe I'm misunderstanding the nature of the redirection you're referring to.</div></div></div></blockquote><div><br></div><div>There is probably a difference in what we mean by CRT _and_ redirectors. Let me try to make my meaning clear.</div><div><br></div><div>By CRT, I am referring to the [r]crt*.o files on Linux which handle program startup and termination logic. I do not know if CRT means something else on Windows.</div></div></div></blockquote><div><br></div><div>This tends to be a source of confusion. The files that you are talking about are not required at all. In fact, you should start with these files not part of the project. These are meant for one purpose: they provide the initialization required for the libc. These files are inherently tied to the implementation because they must initialise the data structures for the exact libc implementation that they comes from. The Windows approach here is actually very clever: it is part of the import library that you link against and it provides the equivalent routines. Yes, at some point, a libc will require initialization, but the files are there as an implementation detail, not as an end goal. They are implicitly non-portable and not of any material concern to such a project.</div><div><br></div><div>For what it is worth, I do believe that these files do really belong in the libc project because they are so intricately tied to the implementation of the language. I just think that the fact these files will be part of the project is merely an implementation detail and should not even be part of the discussion here.</div><div> </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 class="gmail_quote"><div><br></div><div>With respect to "redirectors", I do not want to get locked into an implementation discussion here, so let me just say that they are simply functions in the new libc which merely call into the system libc.</div></div></div></blockquote><div><br></div><div>I think that this is actually important to understand. This was one thing that you pointed out as being really important to the implementation for Linux. I would like to understand what this approach is, because I have at least two different approaches that I can suggest with pros and cons to each which I have used successfully in the past.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_______________________________________________<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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div></div>