Daniel Dunbar | 83b08eb | 2009-03-17 21:38:00 +0000 | [diff] [blame^] | 1 | //===--- ToolChains.h - ToolChain Implementations ---------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef CLANG_LIB_DRIVER_TOOLCHAINS_H_ |
| 11 | #define CLANG_LIB_DRIVER_TOOLCHAINS_H_ |
| 12 | |
| 13 | #include "clang/Driver/ToolChain.h" |
| 14 | |
| 15 | #include "llvm/Support/Compiler.h" |
| 16 | |
| 17 | namespace clang { |
| 18 | namespace driver { |
| 19 | namespace toolchains VISIBILITY_HIDDEN { |
| 20 | |
| 21 | class Generic_GCC : public ToolChain { |
| 22 | public: |
| 23 | Generic_GCC(const HostInfo &Host, const char *Arch, const char *Platform, |
| 24 | const char *OS) : ToolChain(Host, Arch, Platform, OS) { |
| 25 | } |
| 26 | |
| 27 | virtual ArgList *TranslateArgs(ArgList &Args) const { return &Args; } |
| 28 | |
| 29 | virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const { |
| 30 | return *((Tool*) 0); |
| 31 | } |
| 32 | |
| 33 | virtual bool IsMathErrnoDefault() const { return true; } |
| 34 | |
| 35 | virtual bool IsUnwindTablesDefault() const { |
| 36 | // FIXME: Gross; we should probably have some separate target definition, |
| 37 | // possibly even reusing the one in clang. |
| 38 | return getArchName() == "x86_64"; |
| 39 | } |
| 40 | |
| 41 | virtual const char *GetDefaultRelocationModel() const { |
| 42 | return "static"; |
| 43 | } |
| 44 | |
| 45 | virtual const char *GetForcedPicModel() const { |
| 46 | return 0; |
| 47 | } |
| 48 | }; |
| 49 | |
| 50 | } // end namespace toolchains |
| 51 | } // end namespace driver |
| 52 | } // end namespace clang |
| 53 | |
| 54 | #endif |