summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/ToolChains.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 5df96ce54e3..f83c7c9ea8f 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -324,12 +324,20 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
if (!needsProfileRT(Args)) return;
// Select the appropriate runtime library for the target.
- if (isTargetIOSBased())
+ if (isTargetWatchOSBased()) {
+ AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_watchos.a",
+ /*AlwaysLink*/ true);
+ } else if (isTargetTvOSBased()) {
+ AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_tvos.a",
+ /*AlwaysLink*/ true);
+ } else if (isTargetIOSBased()) {
AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_ios.a",
/*AlwaysLink*/ true);
- else
+ } else {
+ assert(isTargetMacOS() && "unexpected non MacOS platform");
AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_osx.a",
/*AlwaysLink*/ true);
+ }
return;
}
OpenPOWER on IntegriCloud