[PATCH] Let Clang invoke CloudABI's linker
ed at nuxi.nl
Thu Mar 19 14:44:54 PDT 2015
In http://reviews.llvm.org/D8250#143551, @echristo wrote:
> Why not just pass all of these down via the driver normally instead of hardcoding options via a tool?
Could you please clarify this for me? Are you referring to the fact that -Bstatic and --eh-frame-hdr are passed to the linker unconditionally?
The latter already seems to happen for some of the other architectures, for example on NetBSD. Regarding -Bstatic: it turns out it's a no-op. It has no effect, as the linker does not know how to do dynamic linking anyway. Still, it is more consistent to pass it along, as the CRT object files that are passed in are purely intended for static linkage.
If CloudABI would ever gain support for dynamic linkage, we wouldn't want Clang to call the linker in a way where it wants to do dynamic linkage, while still providing CRT object files that can only be used for static linkage.
More information about the cfe-commits