On Thu, Jun 27, 2019 at 4:58 PM Saleem Abdulrasool <compnerd at compnerd.org> wrote:> 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. >It's relevant in the sense that any libc implementation on Windows will *require* these files to be part of the implementation. You cannot (as far as I'm aware) borrow the ones from MSVCRT and then implement everything else yourself. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190627/7e09d119/attachment.html>
On Thu, Jun 27, 2019 at 5:22 PM Zachary Turner <zturner at roblox.com> wrote:> > On Thu, Jun 27, 2019 at 4:58 PM Saleem Abdulrasool <compnerd at compnerd.org> > wrote: > >> 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. >> > > It's relevant in the sense that any libc implementation on Windows will > *require* these files to be part of the implementation. You cannot (as far > as I'm aware) borrow the ones from MSVCRT and then implement everything > else yourself. >I feel like I have an even stronger “claim”: independent of any OS/architecture, unless you are developing a freestanding libc for an embedded device, you will need this at some point and you cannot borrow them from another source (which has long been the point of contention about adding these files to the compiler-rt project - they are tied entirely to the libc implementation). As a result, the fact that they will exist is not important to the discussion, it is a given and an implementation detail of the runtime. -- Saleem Abdulrasool compnerd (at) compnerd (dot) org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190627/f371b907/attachment.html>
> Le 28 juin 2019 à 02:30, Saleem Abdulrasool via llvm-dev <llvm-dev at lists.llvm.org> a écrit : > > > I feel like I have an even stronger “claim”: independent of any OS/architecture, unless you are developing a freestanding libc for an embedded device, you will need this at some point and you cannot borrow them from another sourceThey are not required if your kernel and dynamic linker are smart enough to perform the required initialisations / termination. On macOS, there was a time where each binary include a crt.o file that define the _start symbols which was the software entry point and perform the required initialisation before calling main, but for some times now, dyld calls « main » directly and no longer « _start », and the compiler no longer have to include crt.o file in each binaries.