clang 22.0.0git
Haiku.h
Go to the documentation of this file.
1//===--- Haiku.h - Haiku 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_HAIKU_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_HAIKU_H
11
12#include "Gnu.h"
13#include "clang/Driver/Driver.h"
15
16namespace clang {
17namespace driver {
18namespace tools {
19
20/// Directly call GNU Binutils assembler and linker
21namespace haiku {
22class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
23public:
24 Linker(const ToolChain &TC) : Tool("haiku::Linker", "linker", TC) {}
25
26 bool hasIntegratedCPP() const override { return false; }
27 bool isLinkJob() const override { return true; }
28
29 void ConstructJob(Compilation &C, const JobAction &JA,
30 const InputInfo &Output, const InputInfoList &Inputs,
31 const llvm::opt::ArgList &TCArgs,
32 const char *LinkingOutput) const override;
33};
34} // end namespace haiku
35} // end namespace tools
36
37namespace toolchains {
38
39class LLVM_LIBRARY_VISIBILITY Haiku : public Generic_ELF {
40public:
41 Haiku(const Driver &D, const llvm::Triple &Triple,
42 const llvm::opt::ArgList &Args);
43
44 bool HasNativeLLVMSupport() const override;
45
46 bool IsMathErrnoDefault() const override { return false; }
47 bool IsObjCNonFragileABIDefault() const override { return true; }
48 bool isPICDefault() const override { return true; }
49
50 const char *getDefaultLinker() const override { return "ld.lld"; }
51
52 void AddClangSystemIncludeArgs(
53 const llvm::opt::ArgList &DriverArgs,
54 llvm::opt::ArgStringList &CC1Args) const override;
55 void addLibCxxIncludePaths(
56 const llvm::opt::ArgList &DriverArgs,
57 llvm::opt::ArgStringList &CC1Args) const override;
58
60 const llvm::opt::ArgList &Args) const override {
61 return true;
62 }
63
64 SanitizerMask getSupportedSanitizers() const override;
65 unsigned GetDefaultDwarfVersion() const override { return 4; }
66
67 bool GetDefaultStandaloneDebug() const override { return true; }
68
69protected:
70 Tool *buildLinker() const override;
71};
72
73} // end namespace toolchains
74} // end namespace driver
75} // end namespace clang
76
77#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_HAIKU_H
Compilation - A set of tasks to perform for a single driver invocation.
Definition Compilation.h:45
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition Driver.h:99
InputInfo - Wrapper for information about an input source.
Definition InputInfo.h:22
ToolChain - Access to tools for a single platform.
Definition ToolChain.h:92
Tool - Information on a specific compilation tool.
Definition Tool.h:32
Tool(const char *Name, const char *ShortName, const ToolChain &TC)
Definition Tool.cpp:14
Generic_ELF(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition Gnu.h:439
bool isPICDefault() const override
Test whether this toolchain defaults to PIC.
Definition Haiku.h:48
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition Haiku.h:46
const char * getDefaultLinker() const override
GetDefaultLinker - Get the default linker to use.
Definition Haiku.h:50
unsigned GetDefaultDwarfVersion() const override
Definition Haiku.h:65
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition Haiku.h:47
bool GetDefaultStandaloneDebug() const override
Definition Haiku.h:67
bool IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList &Args) const override
Test whether this toolchain supports outline atomics by default.
Definition Haiku.h:59
Haiku(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Haiku - Haiku tool chain which can call as(1) and ld(1) directly.
Definition Haiku.cpp:161
bool HasNativeLLVMSupport() const override
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Definition Haiku.cpp:280
bool isLinkJob() const override
Definition Haiku.h:27
bool hasIntegratedCPP() const override
Definition Haiku.h:26
Linker(const ToolChain &TC)
Definition Haiku.h:24
Directly call GNU Binutils assembler and linker.
Definition Haiku.h:21
SmallVector< InputInfo, 4 > InputInfoList
Definition Driver.h:50
The JSON file list parser is used to communicate input to InstallAPI.