static std::string getOSVersion() {
struct utsname info;
-#ifdef __APPLE__
- // Recognize UNAME_RELEASE environment variable to match Darwin uname.
- const char *UnameOverride = ::getenv("UNAME_RELEASE");
- if (UnameOverride && UnameOverride[0] != '\0')
- return UnameOverride;
-#endif // __APPLE__
-
if (uname(&info))
return "";
}
std::string sys::getHostTriple() {
- // FIXME: Derive directly instead of relying on the autoconf generated
- // variable.
-
- StringRef HostTripleString(LLVM_HOSTTRIPLE);
+ StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
std::pair<StringRef, StringRef> ArchSplit = HostTripleString.split('-');
// Normalize the arch, since the host triple may not actually match the host.