blob: a8360af359007e58036b893bafe847d861cb3ffe [file] [log] [blame]
Daniel Dunbar83b08eb2009-03-17 21:38:00 +00001//===--- 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
17namespace clang {
18namespace driver {
19namespace toolchains VISIBILITY_HIDDEN {
20
21class Generic_GCC : public ToolChain {
22public:
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