[XRay][Driver] Do not link in XRay runtime in shared libs
authorDean Michael Berris <dberris@google.com>
Mon, 25 Sep 2017 23:40:33 +0000 (23:40 +0000)
committerDean Michael Berris <dberris@google.com>
Mon, 25 Sep 2017 23:40:33 +0000 (23:40 +0000)
commitb013dc4b0569b7b10f67c67020e3ef05ed847e0a
tree703e6d41a559fa15f1a9175d658c39173ad6e571
parent305e1b56e30ba384d43298a25e1dccf2f76f3685
[XRay][Driver] Do not link in XRay runtime in shared libs

Summary:
This change ensures that we don't link in the XRay runtime when building
shared libraries with clang. This doesn't prevent us from building
shared libraris tht have XRay instrumentation sleds, but it does prevent
us from linking in the static XRay runtime into a shared library.

The XRay runtime currently doesn't support dynamic registration of
instrumentation sleds in shared objects, which we'll start enabling in
the future. That work has to happen in the back-end and in the runtime.

Reviewers: rnk, pelikan

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D38226

llvm-svn: 314177
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/XRay/xray-shared-noxray.cpp [new file with mode: 0644]