9 #include <llvm/ADT/Triple.h>
10 #include <llvm/Option/ArgList.h>
11 #include <llvm/Support/Error.h>
38 llvm::Error MakeError(llvm::Twine msg);
47 const llvm::Triple &triple,
48 const llvm::Triple &base,
49 llvm::opt::InputArgList &args
60 llvm::Expected<Linker::Archive>
61 LoadArchive(llvm::MemoryBufferRef buffer);
64 llvm::Expected<std::optional<Linker::Archive>>
65 TryLoadArchive(
const std::string &path);
69 enum class OutputType {
77 OutputType GetOutputType();
80 llvm::Error Output(OutputType type,
Prog &prog);
83 llvm::StringRef input,
84 llvm::StringRef output,
88 llvm::Error RunExecutable(
90 llvm::ArrayRef<llvm::StringRef> args
95 const llvm::Triple &llirTriple_;
97 const llvm::Triple &baseTriple_;
100 llvm::opt::InputArgList &args_;
103 const std::string output_;
117 std::string targetCPU_;
119 std::string targetABI_;
121 std::string targetFS_;
127 std::vector<std::string> libraryPaths_;
130 std::vector<std::unique_ptr<llvm::MemoryBuffer>> buffers_;
132 std::vector<llvm::sys::fs::TempFile> tempFiles_;
134 std::vector<std::string> externLibs_;
136 llvm::opt::ArgStringList forwarded_;