Amara Emerson via llvm-dev
2019-Feb-05 22:43 UTC
[llvm-dev] RFC: New clang option to force linking libclang_rt.a
Hi all, As far as I’m aware, there’s no way to specify to the clang driver at link time that you want to link in libclang_rt.a even in the presence of -nostdlib or -nodefaultlib. This behavior can be desirable in some cases as users may want to avoid linking libc++ or libSystem.dylib for example, but still want to have the compiler’s own builtin routines available. Since we view compiler-rt as an intricately linked (no pun intended) part of the overall compiler toolchain, I think this is a reasonable request. I’m proposing a new driver option to trigger this behaviour: -flink-rtlib Thoughts? Thanks, Amara
Duncan Exon Smith via llvm-dev
2019-Feb-05 22:53 UTC
[llvm-dev] RFC: New clang option to force linking libclang_rt.a
+cfe-dev, bcc: llvm-dev, since you're talking about changes to Clang.> On 2019 Feb 5, at 14:43, Amara Emerson <aemerson at apple.com> wrote: > > Hi all, > > As far as I’m aware, there’s no way to specify to the clang driver at link time that you want to link in libclang_rt.a even in the presence of -nostdlib or -nodefaultlib. This behavior can be desirable in some cases as users may want to avoid linking libc++ or libSystem.dylib for example, but still want to have the compiler’s own builtin routines available. Since we view compiler-rt as an intricately linked (no pun intended) part of the overall compiler toolchain, I think this is a reasonable request. > > I’m proposing a new driver option to trigger this behaviour: -flink-rtlib > > Thoughts? > > Thanks, > Amara