1//===- llvm/Support/Win32/Host.inc ------------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This file implements the Win32 Host support. 10// 11//===----------------------------------------------------------------------===// 12 13#include "llvm/Support/Windows/WindowsSupport.h" 14#include <cstdio> 15#include <string> 16 17using namespace llvm; 18 19static std::string updateTripleOSVersion(std::string Triple) { 20 return Triple; 21} 22 23std::string sys::getDefaultTargetTriple() { 24 const char *Triple = LLVM_DEFAULT_TARGET_TRIPLE; 25 26 // Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV. 27#if defined(LLVM_TARGET_TRIPLE_ENV) 28 if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV)) 29 Triple = EnvTriple; 30#endif 31 32 return Triple; 33} 34