<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 19, 2015, at 4:12 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com" class="">mail@justinbogner.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Chris Bieneman <</span><a href="mailto:beanz@apple.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">beanz@apple.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> writes:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">beanz created this revision.<br class="">beanz added a reviewer: bogner.<br class="">beanz added a subscriber: cfe-commits.<br class=""><br class="">This code is a bit undesirable, but it gets clang to work with the<br class="">autoconf and cmake-built libclang_rt.profile libraries.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Yeah, this is a bit awkward, but it makes sense for the transition</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">period. LGTM with a couple of nits.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://reviews.llvm.org/D14847" class="">http://reviews.llvm.org/D14847</a><br class=""><br class="">Files:<br class=""> lib/Driver/ToolChains.cpp<br class=""><br class="">Index: lib/Driver/ToolChains.cpp<br class="">===================================================================<br class="">--- lib/Driver/ToolChains.cpp<br class="">+++ lib/Driver/ToolChains.cpp<br class="">@@ -323,21 +323,35 @@<br class="">                              ArgStringList &CmdArgs) const {<br class="">  if (!needsProfileRT(Args)) return;<br class=""><br class="">+  // TODO: Clean this up once autoconf is gone<br class="">+  SmallString<128> P(getDriver().ResourceDir);<br class="">+  llvm::sys::path::append(P, "lib", "darwin");<br class="">+  auto library = "libclang_rt.profile_osx.a";<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Did you just use auto for a 'const char *'? I don't think its worth the</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">saved keystrokes. Also, the variable should be named "Library”.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>I optimize for keystrokes, and that is more than 2x as many characters!</div><div><br class=""></div><div>I’ll update and commit :-)</div><div><br class=""></div><div>-Chris</div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">+<br class="">  // Select the appropriate runtime library for the target.<br class="">-  if (isTargetWatchOSBased()) {<br class="">-    AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_watchos.a",<br class="">-                      /*AlwaysLink*/ true);<br class="">-  } else if (isTargetTvOSBased()) {<br class="">-    AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_tvos.a",<br class="">-                      /*AlwaysLink*/ true);<br class="">-  } else if (isTargetIOSBased()) {<br class="">-    AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_ios.a",<br class="">-                      /*AlwaysLink*/ true);<br class="">+  if (isTargetWatchOS()) {<br class="">+    library = "libclang_rt.profile_watchos.a";<br class="">+  } else if (isTargetWatchOSSimulator()) {<br class="">+    llvm::sys::path::append(P, "libclang_rt.profile_watchossim.a");<br class="">+    library = getVFS().exists(P) ? "libclang_rt.profile_watchossim.a"<br class="">+                                 : "libclang_rt.profile_watchos.a";<br class="">+  } else if (isTargetTvOS()) {<br class="">+    library = "libclang_rt.profile_tvos.a";<br class="">+  } else if (isTargetTvOSSimulator()) {<br class="">+    llvm::sys::path::append(P, "libclang_rt.profile_tvossim.a");<br class="">+    library = getVFS().exists(P) ? "libclang_rt.profile_tvossim.a"<br class="">+                                 : "libclang_rt.profile_tvos.a";<br class="">+  } else if (isTargetIPhoneOS()) {<br class="">+    library = "libclang_rt.profile_ios.a";<br class="">+  } else if (isTargetIOSSimulator()) {<br class="">+    llvm::sys::path::append(P, "libclang_rt.profile_iossim.a");<br class="">+    library = getVFS().exists(P) ? "libclang_rt.profile_iossim.a"<br class="">+                                 : "libclang_rt.profile_ios.a";<br class="">  } else {<br class="">    assert(isTargetMacOS() && "unexpected non MacOS platform");<br class="">-    AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.profile_osx.a",<br class="">-                      /*AlwaysLink*/ true);<br class="">  }<br class="">+  AddLinkRuntimeLib(Args, CmdArgs, library,<br class="">+                    /*AlwaysLink*/ true);<br class="">  return;<br class="">}</blockquote></div></blockquote></div><br class=""></body></html>