samsonov added a subscriber: samsonov. ================ Comment at: lib/Driver/ToolChains.cpp:368 @@ +367,3 @@ + StringRef OS = ""; + if (isTargetMacOS()) + OS = "osx"; ---------------- Wait, this looks horrible. Can we teach toolchain to give us OS name? http://reviews.llvm.org/D15624