xref: /netbsd-src/external/apache2/llvm/dist/clang/lib/Driver/ToolChains/AIX.h (revision 8ecbf5f02b752fcb7debe1a8fab1dc82602bc760)
1 //===--- AIX.h - AIX ToolChain Implementations ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AIX_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AIX_H
11 
12 #include "clang/Driver/Tool.h"
13 #include "clang/Driver/ToolChain.h"
14 
15 namespace clang {
16 namespace driver {
17 namespace tools {
18 
19 /// aix -- Directly call system default linker.
20 // TODO: Enable direct call to system default assembler.
21 namespace aix {
22 
23 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
24 public:
25   Linker(const ToolChain &TC) : Tool("aix::Linker", "linker", TC) {}
26 
27   bool hasIntegratedCPP() const override { return false; }
28   bool isLinkJob() const override { return true; }
29 
30   void ConstructJob(Compilation &C, const JobAction &JA,
31                     const InputInfo &Output, const InputInfoList &Inputs,
32                     const llvm::opt::ArgList &TCArgs,
33                     const char *LinkingOutput) const override;
34 };
35 
36 } // end namespace aix
37 
38 } // end namespace tools
39 } // end namespace driver
40 } // end namespace clang
41 
42 namespace clang {
43 namespace driver {
44 namespace toolchains {
45 
46 class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain {
47 public:
48   AIX(const Driver &D, const llvm::Triple &Triple,
49       const llvm::opt::ArgList &Args);
50 
51   bool isPICDefault() const override { return true; }
52   bool isPIEDefault() const override { return false; }
53   bool isPICDefaultForced() const override { return true; }
54 
55 protected:
56   Tool *buildLinker() const override;
57 };
58 
59 } // end namespace toolchains
60 } // end namespace driver
61 } // end namespace clang
62 
63 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AIX_H
64