2014-09-24 12:45:14 +08:00
|
|
|
//===- llvm/Support/Win32/Host.inc ------------------------------*- C++ -*-===//
|
2008-10-02 09:17:28 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the Win32 Host support.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-02-13 05:26:20 +08:00
|
|
|
#include "WindowsSupport.h"
|
2011-10-15 12:29:36 +08:00
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
2008-10-02 09:17:28 +08:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
2017-07-07 18:08:52 +08:00
|
|
|
static std::string updateTripleOSVersion(std::string Triple) {
|
|
|
|
return Triple;
|
2017-07-07 17:53:47 +08:00
|
|
|
}
|
|
|
|
|
2011-11-02 05:32:20 +08:00
|
|
|
std::string sys::getDefaultTargetTriple() {
|
2017-06-17 11:19:08 +08:00
|
|
|
const char *Triple = LLVM_DEFAULT_TARGET_TRIPLE;
|
|
|
|
|
|
|
|
// Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV.
|
|
|
|
#if defined(LLVM_TARGET_TRIPLE_ENV)
|
|
|
|
if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV))
|
|
|
|
Triple = EnvTriple;
|
|
|
|
#endif
|
|
|
|
|
2018-05-26 04:39:37 +08:00
|
|
|
return Triple;
|
2008-10-02 09:17:28 +08:00
|
|
|
}
|