diff options
author | Todd Mortimer <mortimer@cvs.openbsd.org> | 2022-02-27 23:45:56 +0000 |
---|---|---|
committer | Todd Mortimer <mortimer@cvs.openbsd.org> | 2022-02-27 23:45:56 +0000 |
commit | d08a3a5b49bc8892e2c0a96ce10d88d86d25a983 (patch) | |
tree | 69e1d612d5949a7cfe00302e29c65c258d9d22ce /gnu/llvm | |
parent | 900655f91ee1c052eb54d33ac5956943647a956c (diff) |
Enable unwind tables on all clang architectures.
Fixes backtraces on i386 (tested by bluhm) and armv7.
OK bluhm@
Diffstat (limited to 'gnu/llvm')
-rw-r--r-- | gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.h b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.h index 96981973f75..813740f2ed3 100644 --- a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.h +++ b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.h @@ -10,6 +10,7 @@ #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_OPENBSD_H #include "Gnu.h" +#include "clang/Basic/LangOptions.h" #include "clang/Driver/Tool.h" #include "clang/Driver/ToolChain.h" @@ -19,10 +20,10 @@ namespace tools { /// openbsd -- Directly call GNU Binutils assembler and linker namespace openbsd { -class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool { +class LLVM_LIBRARY_VISIBILITY Assembler : public Tool { public: Assembler(const ToolChain &TC) - : GnuTool("openbsd::Assembler", "assembler", TC) {} + : Tool("openbsd::Assembler", "assembler", TC) {} bool hasIntegratedCPP() const override { return false; } @@ -32,9 +33,9 @@ public: const char *LinkingOutput) const override; }; -class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool { +class LLVM_LIBRARY_VISIBILITY Linker : public Tool { public: - Linker(const ToolChain &TC) : GnuTool("openbsd::Linker", "linker", TC) {} + Linker(const ToolChain &TC) : Tool("openbsd::Linker", "linker", TC) {} bool hasIntegratedCPP() const override { return false; } bool isLinkJob() const override { return true; } @@ -54,6 +55,8 @@ public: OpenBSD(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args); + bool HasNativeLLVMSupport() const override; + bool IsMathErrnoDefault() const override { return false; } bool IsObjCNonFragileABIDefault() const override { return true; } bool isPIEDefault() const override { return true; } @@ -65,19 +68,25 @@ public: return ToolChain::CST_Libcxx; } + void + AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; + + void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; - CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override; - void AddClangCXXStdlibIncludeArgs( - const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override; - std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component, FileType Type = ToolChain::FT_Static) const override; - unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override { - return 2; + bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override { + return true; + } + + LangOptions::StackProtectorMode + GetDefaultStackProtectorLevel(bool KernelOrKext) const override { + return LangOptions::SSPStrong; } unsigned GetDefaultDwarfVersion() const override { return 2; } |