diff options
| author | Dean Michael Berris <dberris@google.com> | 2018-04-06 05:28:54 +0000 |
|---|---|---|
| committer | Dean Michael Berris <dberris@google.com> | 2018-04-06 05:28:54 +0000 |
| commit | 248148db0032b2f9061449b3dac0a5436ca16a3e (patch) | |
| tree | 17e5c0be268f9867c5065186d995ba521940916c /clang/lib | |
| parent | 1b25a3994e8c6be41b9ec8041a9c61ad2ae01f69 (diff) | |
| download | bcm5719-llvm-248148db0032b2f9061449b3dac0a5436ca16a3e.tar.gz bcm5719-llvm-248148db0032b2f9061449b3dac0a5436ca16a3e.zip | |
[XRay][clang] Add a flag to enable/disable linking XRay deps explicitly
Summary:
This change introduces `-fxray-link-deps` and `-fnoxray-link-deps`. The
`-fnoxray-link-deps` allows for directly controlling which specific XRay
runtime to link. The default is for clang to link the XRay runtime that
is shipped with the compiler (if there are any), but users may want to
explicitly add the XRay dependencies from other locations or other
means.
Reviewers: eizan, echristo, chandlerc
Reviewed By: eizan
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D45354
llvm-svn: 329376
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/XRayArgs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp index 19bf9b7d22c..e151cb907cd 100644 --- a/clang/lib/Driver/XRayArgs.cpp +++ b/clang/lib/Driver/XRayArgs.cpp @@ -76,6 +76,10 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) { options::OPT_fnoxray_always_emit_customevents, false)) XRayAlwaysEmitCustomEvents = true; + if (!Args.hasFlag(options::OPT_fxray_link_deps, + options::OPT_fnoxray_link_deps, true)) + XRayRT = false; + // Validate the always/never attribute files. We also make sure that they // are treated as actual dependencies. for (const auto &Filename : |

