This change introduces support for object files in addition to static
and shared libraries which were already supported which requires
changing the type of the argument from boolean to an enum.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This is needed for crtbegin.o/crtend.o, I originally implemented it as part of D28791 but that change is already pretty big so this is an attempt to split independent parts that could land separately into smaller changes.
I don't know the original rationale of GNU.. but the final result (probably not out of interest of FSF) is that it's a vendor lock of glibc&gcc.
Please implement your crt* in your libc.
Adding joerg who raised concerns in the original change and is bypassed with this change.
This patch attempts to add support for .o/object files from compiler-rt and right now there are no users and the only potential ones are crt* according to my guess.
I'd be happy to abandon this change if we decide to not move forward with D28791. I've made that change a parent revision of this change (although they don't necessarily have to land in that order) to make it obvious.
OK, that makes sense. I'm not a huge fan of how this set of code looks, but it also seems unfair to require you to extensively refactor it for this.
Any issues with crtbegin/end and where people believe things should be implemented for any given OS is orthogonal to this.
Thanks!
-eric
clang/lib/Driver/ToolChain.cpp | ||
---|---|---|
376 ↗ | (On Diff #179403) | For mingw (Triple.isWindowsGNUEnvironment) the natural extension is .o as well. So maybe check IsITANMSVCWindows instead here? |
383 ↗ | (On Diff #179403) | This looks like it's incorrectly rebased across rL343537; the non-mingw case should be .lib, not .dll - that was corrected in that commit. |