Mercurial > hg > CbC > CbC_llvm
comparison clang/lib/Driver/ToolChains/MSVC.h @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 1d019706d866 |
children | 5f17cb93ff66 |
comparison
equal
deleted
inserted
replaced
220:42394fc6a535 | 221:79ff65ed7e25 |
---|---|
7 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
8 | 8 |
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H | 9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H |
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H | 10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSVC_H |
11 | 11 |
12 #include "AMDGPU.h" | |
12 #include "Cuda.h" | 13 #include "Cuda.h" |
13 #include "clang/Basic/DebugInfoOptions.h" | 14 #include "clang/Basic/DebugInfoOptions.h" |
14 #include "clang/Driver/Compilation.h" | 15 #include "clang/Driver/Compilation.h" |
15 #include "clang/Driver/Tool.h" | 16 #include "clang/Driver/Tool.h" |
16 #include "clang/Driver/ToolChain.h" | 17 #include "clang/Driver/ToolChain.h" |
21 | 22 |
22 /// Visual studio tools. | 23 /// Visual studio tools. |
23 namespace visualstudio { | 24 namespace visualstudio { |
24 class LLVM_LIBRARY_VISIBILITY Linker : public Tool { | 25 class LLVM_LIBRARY_VISIBILITY Linker : public Tool { |
25 public: | 26 public: |
26 Linker(const ToolChain &TC) | 27 Linker(const ToolChain &TC) : Tool("visualstudio::Linker", "linker", TC) {} |
27 : Tool("visualstudio::Linker", "linker", TC, RF_Full, | |
28 llvm::sys::WEM_UTF16) {} | |
29 | 28 |
30 bool hasIntegratedCPP() const override { return false; } | 29 bool hasIntegratedCPP() const override { return false; } |
31 bool isLinkJob() const override { return true; } | 30 bool isLinkJob() const override { return true; } |
32 | 31 |
33 void ConstructJob(Compilation &C, const JobAction &JA, | 32 void ConstructJob(Compilation &C, const JobAction &JA, |
34 const InputInfo &Output, const InputInfoList &Inputs, | 33 const InputInfo &Output, const InputInfoList &Inputs, |
35 const llvm::opt::ArgList &TCArgs, | 34 const llvm::opt::ArgList &TCArgs, |
36 const char *LinkingOutput) const override; | 35 const char *LinkingOutput) const override; |
37 }; | |
38 | |
39 class LLVM_LIBRARY_VISIBILITY Compiler : public Tool { | |
40 public: | |
41 Compiler(const ToolChain &TC) | |
42 : Tool("visualstudio::Compiler", "compiler", TC, RF_Full, | |
43 llvm::sys::WEM_UTF16) {} | |
44 | |
45 bool hasIntegratedAssembler() const override { return true; } | |
46 bool hasIntegratedCPP() const override { return true; } | |
47 bool isLinkJob() const override { return false; } | |
48 | |
49 void ConstructJob(Compilation &C, const JobAction &JA, | |
50 const InputInfo &Output, const InputInfoList &Inputs, | |
51 const llvm::opt::ArgList &TCArgs, | |
52 const char *LinkingOutput) const override; | |
53 | |
54 std::unique_ptr<Command> GetCommand(Compilation &C, const JobAction &JA, | |
55 const InputInfo &Output, | |
56 const InputInfoList &Inputs, | |
57 const llvm::opt::ArgList &TCArgs, | |
58 const char *LinkingOutput) const; | |
59 }; | 36 }; |
60 } // end namespace visualstudio | 37 } // end namespace visualstudio |
61 | 38 |
62 } // end namespace tools | 39 } // end namespace tools |
63 | 40 |
123 llvm::opt::ArgStringList &CC1Args) const override; | 100 llvm::opt::ArgStringList &CC1Args) const override; |
124 | 101 |
125 void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, | 102 void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, |
126 llvm::opt::ArgStringList &CC1Args) const override; | 103 llvm::opt::ArgStringList &CC1Args) const override; |
127 | 104 |
128 bool getWindowsSDKLibraryPath(std::string &path) const; | 105 void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, |
129 /// Check if Universal CRT should be used if available | 106 llvm::opt::ArgStringList &CC1Args) const override; |
130 bool getUniversalCRTLibraryPath(std::string &path) const; | 107 |
108 bool getWindowsSDKLibraryPath( | |
109 const llvm::opt::ArgList &Args, std::string &path) const; | |
110 bool getUniversalCRTLibraryPath(const llvm::opt::ArgList &Args, | |
111 std::string &path) const; | |
131 bool useUniversalCRT() const; | 112 bool useUniversalCRT() const; |
132 VersionTuple | 113 VersionTuple |
133 computeMSVCVersion(const Driver *D, | 114 computeMSVCVersion(const Driver *D, |
134 const llvm::opt::ArgList &Args) const override; | 115 const llvm::opt::ArgList &Args) const override; |
135 | 116 |
153 Tool *buildAssembler() const override; | 134 Tool *buildAssembler() const override; |
154 private: | 135 private: |
155 std::string VCToolChainPath; | 136 std::string VCToolChainPath; |
156 ToolsetLayout VSLayout = ToolsetLayout::OlderVS; | 137 ToolsetLayout VSLayout = ToolsetLayout::OlderVS; |
157 CudaInstallationDetector CudaInstallation; | 138 CudaInstallationDetector CudaInstallation; |
139 RocmInstallationDetector RocmInstallation; | |
158 }; | 140 }; |
159 | 141 |
160 } // end namespace toolchains | 142 } // end namespace toolchains |
161 } // end namespace driver | 143 } // end namespace driver |
162 } // end namespace clang | 144 } // end namespace clang |