[PATCH] D15624: Add iOS/watchOS/tvOS support for ASan (clang part)

Alexey Samsonov via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 15:56:17 PST 2016

samsonov added a comment.

Sorry, lost track of this.

Comment at: lib/Driver/ToolChains.cpp:368
@@ +367,3 @@
+  StringRef OS = "";
+  if (isTargetMacOS())
+    OS = "osx";
zaks.anna wrote:
> samsonov wrote:
> > Wait, this looks horrible. Can we teach toolchain to give us OS name?
> These are not OS names; they are prefixes we use to name the library. I believe "appletvsimulator" would be a platform name, which is too long to append to the dylib name.
> I could factor this out into a separate function, but there are no other immediate users. Not sure if the profiler library could be refactored to use it, logic there seems more complicated.
Then we can name it as getOSLibraryNamePrefix() or smth. like that. I worry that this logic would hardly be discoverable inside `AddLinkSanitizerLibArgs` if it's going to be reused somewhere (which is likely).


More information about the cfe-commits mailing list