DragonFly.h revision 317019
1317019Sdim//===--- DragonFly.h - DragonFly ToolChain Implementations ------*- C++ -*-===//
2317019Sdim//
3317019Sdim//                     The LLVM Compiler Infrastructure
4317019Sdim//
5317019Sdim// This file is distributed under the University of Illinois Open Source
6317019Sdim// License. See LICENSE.TXT for details.
7317019Sdim//
8317019Sdim//===----------------------------------------------------------------------===//
9317019Sdim
10317019Sdim#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
11317019Sdim#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
12317019Sdim
13317019Sdim#include "Gnu.h"
14317019Sdim#include "clang/Driver/Tool.h"
15317019Sdim#include "clang/Driver/ToolChain.h"
16317019Sdim
17317019Sdimnamespace clang {
18317019Sdimnamespace driver {
19317019Sdimnamespace tools {
20317019Sdim/// dragonfly -- Directly call GNU Binutils assembler and linker
21317019Sdimnamespace dragonfly {
22317019Sdimclass LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
23317019Sdimpublic:
24317019Sdim  Assembler(const ToolChain &TC)
25317019Sdim      : GnuTool("dragonfly::Assembler", "assembler", TC) {}
26317019Sdim
27317019Sdim  bool hasIntegratedCPP() const override { return false; }
28317019Sdim
29317019Sdim  void ConstructJob(Compilation &C, const JobAction &JA,
30317019Sdim                    const InputInfo &Output, const InputInfoList &Inputs,
31317019Sdim                    const llvm::opt::ArgList &TCArgs,
32317019Sdim                    const char *LinkingOutput) const override;
33317019Sdim};
34317019Sdim
35317019Sdimclass LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
36317019Sdimpublic:
37317019Sdim  Linker(const ToolChain &TC) : GnuTool("dragonfly::Linker", "linker", TC) {}
38317019Sdim
39317019Sdim  bool hasIntegratedCPP() const override { return false; }
40317019Sdim  bool isLinkJob() const override { return true; }
41317019Sdim
42317019Sdim  void ConstructJob(Compilation &C, const JobAction &JA,
43317019Sdim                    const InputInfo &Output, const InputInfoList &Inputs,
44317019Sdim                    const llvm::opt::ArgList &TCArgs,
45317019Sdim                    const char *LinkingOutput) const override;
46317019Sdim};
47317019Sdim} // end namespace dragonfly
48317019Sdim} // end namespace tools
49317019Sdim
50317019Sdimnamespace toolchains {
51317019Sdim
52317019Sdimclass LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF {
53317019Sdimpublic:
54317019Sdim  DragonFly(const Driver &D, const llvm::Triple &Triple,
55317019Sdim            const llvm::opt::ArgList &Args);
56317019Sdim
57317019Sdim  bool IsMathErrnoDefault() const override { return false; }
58317019Sdim
59317019Sdimprotected:
60317019Sdim  Tool *buildAssembler() const override;
61317019Sdim  Tool *buildLinker() const override;
62317019Sdim};
63317019Sdim
64317019Sdim} // end namespace toolchains
65317019Sdim} // end namespace driver
66317019Sdim} // end namespace clang
67317019Sdim
68317019Sdim#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
69