summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-10-24 03:13:37 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-10-24 03:13:37 +0000
commit543a78b55ee993c2977fc2984f278f7ec0125765 (patch)
treeccb5913817c210eb5e0dc89bfce9f0620961c129 /clang/lib/Driver/Tools.h
parent2259400f8e112b580d6e2dfb55066fc94acf2190 (diff)
downloadbcm5719-llvm-543a78b55ee993c2977fc2984f278f7ec0125765.tar.gz
bcm5719-llvm-543a78b55ee993c2977fc2984f278f7ec0125765.zip
Driver: add CrossWindowsToolChain
This is a very basic toolchain. It supports cross-compiling Windows (primarily inspired by the WoA target). It is meant to use clang with the LLVM IAS and a binutils ld-compatible interface for the linker (eventually to be lld). It does not perform any "standard" GCC lookup, nor does it perform any special adjustments given that it is expected to be used in an environment where the user is using MSVCRT (and as such Visual Studio headers) and the Windows SDK. The primary runtime library is expected to be compiler-rt and the C++ implementation to be libc++. It also expects that a sysroot has been setup given the usual Unix semantics (standard C headers in /usr/include, all the import libraries available in /usr/lib). It also expects that an entry point stub is present in /usr/lib (crtbegin.obj for executables, crtbeginS.obj for shared libraries). The entry point stub is responsible for running any GNU constructors. llvm-svn: 220546
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r--clang/lib/Driver/Tools.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 8ab145652bb..59af8a0ec97 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -645,6 +645,32 @@ namespace XCore {
};
} // end namespace XCore.
+namespace CrossWindows {
+class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
+public:
+ Assemble(const ToolChain &TC) : Tool("CrossWindows::Assemble", "as", TC) { }
+
+ bool hasIntegratedCPP() const override { return false; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+
+class LLVM_LIBRARY_VISIBILITY Link : public Tool {
+public:
+ Link(const ToolChain &TC) : Tool("CrossWindows::Link", "ld", TC, RF_Full) {}
+
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+}
} // end namespace toolchains
} // end namespace driver
OpenPOWER on IntegriCloud