1 //===- llvm/TargetParser/Win32/Host.inc -------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements the Win32 Host support.
11 //===----------------------------------------------------------------------===//
13 // We need to include config.h here because LLVM_DEFAULT_TARGET_TRIPLE is not
14 // defined in llvm-config.h if it is unset.
15 #include "llvm/Config/config.h"
16 #include "llvm/Support/Windows/WindowsSupport.h"
22 static std::string updateTripleOSVersion(std::string Triple) { return Triple; }
24 std::string sys::getDefaultTargetTriple() {
25 const char *Triple = LLVM_DEFAULT_TARGET_TRIPLE;
27 // Override the default target with an environment variable named by
28 // LLVM_TARGET_TRIPLE_ENV.
29 #if defined(LLVM_TARGET_TRIPLE_ENV)
30 if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV))