summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2017-01-05 05:20:27 +0000
committerDylan McKay <dylanmckay34@gmail.com>2017-01-05 05:20:27 +0000
commit924fa3abdc1d28f7ecbc69cc70002ad0effe0a4c (patch)
treed9ad2a8e7849c330d3603b5f72ba0caa655957d8 /clang/lib/Driver/Tools.h
parentc1d5d110a1f5d910ee997ce1f08f635c8e7baba2 (diff)
downloadbcm5719-llvm-924fa3abdc1d28f7ecbc69cc70002ad0effe0a4c.tar.gz
bcm5719-llvm-924fa3abdc1d28f7ecbc69cc70002ad0effe0a4c.zip
Add AVR target and toolchain to Clang
Summary: Authored by Senthil Kumar Selvaraj This patch adds barebones support in Clang for the (experimental) AVR target. It uses the integrated assembler for assembly, and the GNU linker for linking, as lld doesn't know about the target yet. The DataLayout string is the same as the one in AVRTargetMachine.cpp. The alignment specs look wrong to me, as it's an 8 bit target and all types only need 8 bit alignment. Clang failed with a datalayout mismatch error when I tried to change it, so I left it that way for now. Reviewers: rsmith, dylanmckay, cfe-commits, rengolin Subscribers: rengolin, jroelofs, wdng Differential Revision: https://reviews.llvm.org/D27123 llvm-svn: 291082
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r--clang/lib/Driver/Tools.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 98dcf841169..9d5b892d424 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -990,6 +990,19 @@ class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
} // end namespace NVPTX
+namespace AVR {
+class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
+public:
+ Linker(const ToolChain &TC) : GnuTool("AVR::Linker", "avr-ld", TC) {}
+ 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 AVR
+
} // end namespace tools
} // end namespace driver
} // end namespace clang
OpenPOWER on IntegriCloud