[llvm-dev] Use of the C++ standard library in XRay compiler-rt

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 8 13:49:33 PST 2017


So I stumbled across an issue that I think is a bit fundamental:

The xray runtime uses the C++ standard library.

This seems like a problem because whatever C++ standard library is used to
compile the XRay runtime may not be the same as the C++ standard library
(if any) that is used to build the target application and link XRay into.

Does this make sense? Is this a problem?

Talking to Chandler over lunch it sounds like there's a couple of options -
either remove the dependency (much like, I believe, the sanitizer runtimes
- use nothing from the C++ standard library, replace everything with custom
data structures, etc) or, perhaps more drastically, change the way the
runtimes are built such that they statically link a private version of,
say, libc++.

Chandler seemed to think maybe we could do this state-side (Tim? Might be
something you could handle) rather than pushing it back on to Dean, if that
sounds reasonable?

(this came up for me due to what's probably a bug in the way compiler-rt is
built - where the lib itself is built with the host compiler but the tests
are built/linked with the just-bulit clang. My host compiler uses libstdc++
6, whereas the just-built clang will use libstdc++ 4.8. So it fails to link
due to this mismatch)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170308/986f3472/attachment.html>


More information about the llvm-dev mailing list