[llvm-dev] RFC: New clang option to force linking libclang_rt.a
Amara Emerson via llvm-dev
llvm-dev at lists.llvm.org
Tue Feb 5 14:43:10 PST 2019
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
More information about the llvm-dev
mailing list