9#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H
19#include "llvm/Frontend/Debug/Options.h"
20#include "llvm/WindowsDriver/MSVCPaths.h"
27namespace visualstudio {
28class LLVM_LIBRARY_VISIBILITY
Linker final :
public Tool {
37 const llvm::opt::ArgList &TCArgs,
38 const char *LinkingOutput)
const override;
49 const llvm::opt::ArgList &Args);
51 llvm::opt::DerivedArgList *
52 TranslateArgs(
const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
56 getDefaultUnwindTableLevel(
const llvm::opt::ArgList &Args)
const override;
57 bool isPICDefault()
const override;
58 bool isPIEDefault(
const llvm::opt::ArgList &Args)
const override;
59 bool isPICDefaultForced()
const override;
65 return getTriple().isOSBinFormatCOFF() ? llvm::codegenoptions::DIF_CodeView
66 : llvm::codegenoptions::DIF_DWARF;
72 return llvm::DebuggerKind::Default;
79 std::string getSubDirectoryPath(llvm::SubDirectoryType
Type,
80 llvm::StringRef SubdirParent =
"")
const;
81 std::string getSubDirectoryPath(llvm::SubDirectoryType
Type,
82 llvm::Triple::ArchType TargetArch)
const;
85 return VSLayout == llvm::ToolsetLayout::VS2017OrNewer;
89 AddClangSystemIncludeArgs(
const llvm::opt::ArgList &DriverArgs,
90 llvm::opt::ArgStringList &CC1Args)
const override;
91 void AddClangCXXStdlibIncludeArgs(
92 const llvm::opt::ArgList &DriverArgs,
93 llvm::opt::ArgStringList &CC1Args)
const override;
95 void AddCudaIncludeArgs(
const llvm::opt::ArgList &DriverArgs,
96 llvm::opt::ArgStringList &CC1Args)
const override;
98 void AddHIPIncludeArgs(
const llvm::opt::ArgList &DriverArgs,
99 llvm::opt::ArgStringList &CC1Args)
const override;
101 void AddHIPRuntimeLibArgs(
const llvm::opt::ArgList &Args,
102 llvm::opt::ArgStringList &CmdArgs)
const override;
104 void addSYCLIncludeArgs(
const llvm::opt::ArgList &DriverArgs,
105 llvm::opt::ArgStringList &CC1Args)
const override;
107 bool getWindowsSDKLibraryPath(
108 const llvm::opt::ArgList &Args, std::string &path)
const;
109 bool getUniversalCRTLibraryPath(
const llvm::opt::ArgList &Args,
110 std::string &path)
const;
111 bool useUniversalCRT()
const;
113 computeMSVCVersion(
const Driver *
D,
114 const llvm::opt::ArgList &Args)
const override;
116 std::string ComputeEffectiveClangTriple(
const llvm::opt::ArgList &Args,
120 void printVerboseInfo(raw_ostream &OS)
const override;
125 addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs,
126 llvm::opt::ArgStringList &CC1Args,
130 void AddSystemIncludeWithSubfolder(
const llvm::opt::ArgList &DriverArgs,
131 llvm::opt::ArgStringList &CC1Args,
132 const std::string &folder,
133 const Twine &subfolder1,
134 const Twine &subfolder2 =
"",
135 const Twine &subfolder3 =
"")
const;
137 Tool *buildLinker()
const override;
138 Tool *buildAssembler()
const override;
140 std::optional<llvm::StringRef> WinSdkDir, WinSdkVersion, WinSysRoot;
141 std::string VCToolChainPath;
142 llvm::ToolsetLayout VSLayout = llvm::ToolsetLayout::OlderVS;
Simple wrapper for toolchain detector with costly initialization.
The base class of the type hierarchy.
Compilation - A set of tasks to perform for a single driver invocation.
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
The JSON file list parser is used to communicate input to InstallAPI.