This is a re-apply of r319294. adds -fseh-exceptions and -fdwarf-exceptions flags clang will check if the user has specified an exception model flag, in the absense of specifying the exception model clang will then check the driver default and append the model flag for that target to cc1 -fno-exceptions has a higher priority then specifying the model move __SEH__ macro definitions out of Targets into InitPreprocessor behind the -fseh-exceptions flag move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check remove unused USESEHExceptions from the MinGW Driver fold USESjLjExceptions into a new GetExceptionModel function that gives the toolchain classes more flexibility with eh models Reviewers: rnk, mstorsjo Differential Revision: https://reviews.llvm.org/D39673 llvm-svn: 319297
87 lines
2.7 KiB
C++
87 lines
2.7 KiB
C++
//===--- NetBSD.h - NetBSD ToolChain Implementations ------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_NETBSD_H
|
|
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_NETBSD_H
|
|
|
|
#include "Gnu.h"
|
|
#include "clang/Driver/Tool.h"
|
|
#include "clang/Driver/ToolChain.h"
|
|
|
|
namespace clang {
|
|
namespace driver {
|
|
namespace tools {
|
|
|
|
/// netbsd -- Directly call GNU Binutils assembler and linker
|
|
namespace netbsd {
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
public:
|
|
Assembler(const ToolChain &TC)
|
|
: GnuTool("netbsd::Assembler", "assembler", TC) {}
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
const llvm::opt::ArgList &TCArgs,
|
|
const char *LinkingOutput) const override;
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
public:
|
|
Linker(const ToolChain &TC) : GnuTool("netbsd::Linker", "linker", TC) {}
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
const llvm::opt::ArgList &TCArgs,
|
|
const char *LinkingOutput) const override;
|
|
};
|
|
} // end namespace netbsd
|
|
} // end namespace tools
|
|
|
|
namespace toolchains {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
|
|
public:
|
|
NetBSD(const Driver &D, const llvm::Triple &Triple,
|
|
const llvm::opt::ArgList &Args);
|
|
|
|
bool IsMathErrnoDefault() const override { return false; }
|
|
bool IsObjCNonFragileABIDefault() const override { return true; }
|
|
|
|
CXXStdlibType GetDefaultCXXStdlibType() const override;
|
|
|
|
std::string findLibCxxIncludePath() const override;
|
|
void addLibStdCxxIncludePaths(
|
|
const llvm::opt::ArgList &DriverArgs,
|
|
llvm::opt::ArgStringList &CC1Args) const override;
|
|
|
|
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override {
|
|
return true;
|
|
}
|
|
|
|
llvm::ExceptionHandling GetExceptionModel(
|
|
const llvm::opt::ArgList &Args) const override;
|
|
|
|
SanitizerMask getSupportedSanitizers() const override;
|
|
|
|
protected:
|
|
Tool *buildAssembler() const override;
|
|
Tool *buildLinker() const override;
|
|
};
|
|
|
|
} // end namespace toolchains
|
|
} // end namespace driver
|
|
} // end namespace clang
|
|
|
|
#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_NETBSD_H
|