clang 24.0.0git
Cygwin.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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_CYGWIN_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CYGWIN_H
11
12#include "Gnu.h"
14
15namespace clang {
16namespace driver {
17namespace toolchains {
18
19class LLVM_LIBRARY_VISIBILITY Cygwin : public Generic_GCC {
20public:
21 Cygwin(const Driver &D, const llvm::Triple &Triple,
22 const llvm::opt::ArgList &Args);
23
24 llvm::ExceptionHandling
25 GetExceptionModel(const llvm::opt::ArgList &Args) const override;
26
27 void
28 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
29 llvm::opt::ArgStringList &CC1Args) const override;
30
31 void
32 addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
33 llvm::opt::ArgStringList &CC1Args, BoundArch BA,
34 Action::OffloadKind DeviceOffloadKind) const override;
35
36 unsigned GetDefaultDwarfVersion() const override { return 4; }
37
38protected:
39 Tool *buildLinker() const override;
40};
41
42namespace cygwin {
43class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
44public:
45 Linker(const ToolChain &TC) : Tool("cygwin::Linker", "linker", TC) {}
46
47 bool hasIntegratedCPP() const override { return false; }
48 bool isLinkJob() const override { return true; }
49
50 void ConstructJob(Compilation &C, const JobAction &JA,
51 const InputInfo &Output, const InputInfoList &Inputs,
52 const llvm::opt::ArgList &TCArgs,
53 const char *LinkingOutput) const override;
54};
55} // end namespace cygwin
56
57} // end namespace toolchains
58} // end namespace driver
59} // end namespace clang
60
61#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CYGWIN_H
Compilation - A set of tasks to perform for a single driver invocation.
Definition Compilation.h:46
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition Driver.h:93
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:13
llvm::ExceptionHandling GetExceptionModel(const llvm::opt::ArgList &Args) const override
GetExceptionModel - Return the tool chain exception model.
Definition Cygwin.cpp:52
unsigned GetDefaultDwarfVersion() const override
Definition Cygwin.h:36
void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Add the clang cc1 arguments for system include paths.
Definition Cygwin.cpp:59
Cygwin(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition Cygwin.cpp:25
void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, BoundArch BA, Action::OffloadKind DeviceOffloadKind) const override
Add options that need to be passed to cc1 for this target.
Definition Cygwin.cpp:114
Generic_GCC(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition Gnu.cpp:3046
bool isLinkJob() const override
Definition Cygwin.h:48
bool hasIntegratedCPP() const override
Definition Cygwin.h:47
SmallVector< InputInfo, 4 > InputInfoList
Definition Driver.h:49
Top level wrappers for InstallAPI frontend operations.
Represents a bound architecture for offload / multiple architecture compilation.